On Fri, 2008 Feb 22 08:19:44 -0600, Jeff Pohlmeyer wrote:
Thanks for the tip, Daniel - just for kicks I ran these flags on the GeanyLua plugin. ( Man, what a mess! :)
The first time is always the trickiest ^_^
I managed to get everything cleaned up, with the exception of the -Wconversion flag. As far as I can tell, there is absolutely no way to use that flag with e.g. gtk_misc_set_alignment() without getting a warning.
Well, there it would just be a matter of casting the (presumably integer) second and third arguments to float. Though I'd agree that doing this sort of thing every time the warning arises is overkill.
What I normally do is filter the warnings, and address only the conversions that are a bit iffy (float -> int, signed -> unsigned, etc.)---making up for the lack of granularity in what -Wconversion reports.
So I did some googling and it seems that the -Wconversion flag is not intended for general use, it is only useful when converting K&R code to ANSI/ISO. Apparently this issue has been addressed in gcc-4.3 but I'm still using 4.2.1
Just thought I would pass that along before someone else throws a keyboard through their monitor :-)
Yeah, of the set of warnings I gave, that's the least compelling one. It's nice to use from the start with newly-written code, but in most other cases, it's not worth the effort to make the compiler shut up.