Ethereal-dev: Re: [Ethereal-dev] -pedantic

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Sun, 8 Feb 2004 15:09:33 +0100
On Sun, Feb 08, 2004 at 02:33:47PM +0100, Michael Tuexen wrote:
> my point is that we use -pedantic on the top level directory
> only if --with-extra-gcc-checks is used, but it is used always
> in the subdirectories.

The *idea* was, to make everything compile without warnings with
-pedantic, just as we did when we introduced -Wall -W. This would
help to prevent people sending code with // comments, unnecessary
commas at the end of enums etc. Unfortunately, some 

> So I'm asking for doing the same on the toplevel directory and
> the subdirectories and to use -pedantic only when 
> --with-extra-gcc-checks
> is used.

Ah, yes. I managed to get rid of almost all warnings by doing two
things:
1) use the __extension__ keyword to get rid of the ...braced...
   warning as per Oliviers suggestion
2) in glib-confg and gtk-config *add* "-isystem <path>" for every
   "-I<path>": This tells gcc to treat these includes as system
   includes and thus does not generate warnings caused by stuff
   imported from glib/gtk

So, while this is strictly speaking a glib/gtk "bug" it generates
so many warnings as to negate the intended effect by generating
too many warnings so that most developers simply don't care to look
at warnings at all :-(
I'll revert the patch. For those compiling with extra-checks I
recommend the two steps mentioned above. For myself, I'm using a
small, script that generates warning files for each type of warning.
As input, it takes the result of "make all 2>&1 | tee ../logs/make.log"
I've attached it below. (yeah, I know it's ugly, but it does what I
want and I'm not willing to spend time on it :-)

 ciao
        Jï¿œrg
-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.

Attachment: warnings.sh
Description: Bourne shell script