Jens,
My understanding is that -Wconversion warns you about differences between new-style function prototypes, i.e., NSSize NSMakeSize(float width, float height), and old-style function prototypes, i.e., NSSize NSMakeSize(). I think you'd actually get rid of the warning by casting the arguments as double rather than float, ironically. The warning is basically obsolete and useless. I'd recommend not using -Wconversion.
-Jeff
On Nov 27, 2007, at 10:52 AM, Jens Miltner wrote: Hi,
I have the following line in my source code:
NSSize warningIconSize = NSMakeSize(iconSize.width * 0.75, iconSize.height * 0.75);
This line triggers the following errors:
warning: passing argument 1 of 'NSMakeSize' as 'float' rather than 'double' due to prototype warning: passing argument 2 of 'NSMakeSize' as 'float' rather than 'double' due to prototype
I tried to get rid of these warnings by explicitely casting the arguments of NSMakeSize to float, but this doesn't help. I also tried to assign the values to temporary variables of type float - still got the same warnings.
FWIW, I'm using "-Wconversion -Wall -Winvalid-pch" as warning settings. I probably can get rid of the warnings by reducing the warning level, but in theory I should be able to get rid of the warnings by 'fixing' the code, shouldn't I?
Any ideas how to get rid of these warnings?
Thanks, </jum>
|