Re: Compiler warnings when compiling centericq

"Jayjay" <[email protected]> Mon, 26 Feb 2007 11:55:55 +0100
Newsgroups gmane.network.centericq
Message-ID <[email protected]>
Hi HÃ¥kan,

> I think that centericq would benefit of getting the number of compiler
> warnings minimized when compiling with the options -Wall -pedantic
> (with gcc/g++).
>
> This would hopefully improve the quality of the code, and hopefully
> get rid of some memory leaks.

That's a good idea. I already changed the configure.ac locally, at the line 
containing AM_INIT_AUTOMAKE and added ([-Wall]). But I didn't see that much 
of a difference somehow.

Until releasing the code as a stable release, we should enable the necessary 
warnings that help us develop clean code. I would suggest adding more 
options, because -Wall doesn't mean what it says. A few interesting options 
should be added too.

A cite from [1], Perl uses:
gcc -g -O -pedantic -Wall -W -Wshadow -Wpointer-arith
-Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wno-long-long

The GCC online documentation explain these options [2]. Some options only 
apply to C code. I guess it doesn't hurd C++ code though. Should we add 
these options?

Cheers,
Jayjay


[1] Aug 2004 - http://peter.hates-software.com/2004/08/20/6550cefa.html
[2] 
http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Warning-Options.html#Warning-Options 


_______________________________________________
Cicq mailing list
Cicq-xGejAJT2w6wWP6gT/[email protected]
http://mailman.linuxpl.org/mailman/listinfo/cicq
Questions? Check the FAQ first: http://centericq.de/faq/