Daniel Richard G. firstname.lastname@example.org wrote:
Nick Treleaven wrote:
BTW do you use any special warnings for gcc that can reveal these things?
I have a standard set of flags:
CFLAGS = -O0 -g3 -pedantic -fno-common -pipe -W -Wall -Wcast-align \ -Wcast-qual -Wconversion -Wformat=2 -Winline -Wpointer-arith \ -Wshadow -Wundef -Wno-unused-parameter -Waggregate-return \ -Wnested-externs -Wstrict-prototypes
Thanks for the tip, Daniel - just for kicks I ran these flags on the GeanyLua plugin. ( Man, what a mess! :)
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.
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 :-)