On Wed May 25, 2005 at 10:03:08 +1000, John Clarke wrote:
>On Wed, May 25, 2005 at 07:36:33 +1000, Erik de Castro Lopo wrote:
>> Jamie Honan wrote:
>> 
>> > On Tue, May 24, 2005 at 10:41:27PM +1000, Erik de Castro Lopo wrote:
>> > > If -Wshadow catches on single bug its worth living with or 
>> > > rather working around any spurious warnings.
>> > > 
>> > > I wouldn't cut C code without it.
>> > 
>> > Erik, what are the warnings you regularly use?
>> 
>> For libsndfile the configure script chack to see if the compiler
>> is GCC and if it is turns on the following:
>> 
>>      -W -Wall -Wstrict-prototypes -Wmissing-prototypes
>>      -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs
>>      -Wshadow -Wbad-function-cast -Wwrite-strings
>
>I do something similar, but my list of warnings is slightly different:
>
>    -Wall -W -Wpointer-arith -Wfloat-equal -Wcast-align -Wcast-qual
>    -Waggregate-return -Wredundant-decls -Wshadow -Wwrite-strings
>    -Wno-unused-parameter -Wundef -Wmissing-declarations
>    -Wstrict-prototypes -std=c99 -Wmissing-prototypes
>
>and for C++ I use:
>
>    -Wall -W -Wpointer-arith -Wfloat-equal -Wcast-align -Wcast-qual
>    -Waggregate-return -Wno-unused-parameter -Wreorder
>    -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-non-template-friend
>
>And I always try to fix warnings when they appear so that my code
>compiles without generating any if possible, then any new warnings stand
>out and don't become lost in the noise.

Absolutely, -Werror is brilliant for this because it *forces* you to fix
the warnings. Or more importantly it forces others in the development team
to fix them.

Cheers,

Benno
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to