So I've read before that its general good practice to take care of compiler warnings whenever possible and that makes sense to me and I do so as much as I can, but I run into some of them every so often that don't really make sense to me. Such as:
conversion from 'int' to 'float', possible loss of data
Firstly, how would I lose data if I'm going from int to float? Obviously if I was going from float to int I would potentially lose data and that wouldn't be good generally speaking, but from int to float?
Secondly, the line of code referred to in my current program is taking the return value of one function (not even my function, from a library I'm using) and applying it as a parameter in another function (also not one of mine). Would it be considered good practice to explicitly re-cast the int as a float and then use it as a parameter in this case?