Wireshark-dev: Re: [Wireshark-dev] Prevent compiler warnings by using "stop on warnings"/"treat

From: Stephen Fisher <stephentfisher@xxxxxxxxx>
Date: Wed, 21 Mar 2007 17:46:50 -0700
On Tue, Mar 20, 2007 at 11:09:40PM -0700, Stephen Fisher wrote:
> On Tue, Mar 20, 2007 at 05:57:12PM -0700, Guy Harris wrote:
> 
> > Or do it in the config file - look for "-W" in the top-level 
> > configure.in and the Wiretap configure.in.
> 
> Thanks.  I introduced -Werror into the configure.in file in wiretap/ 
> locally to follow Ulf's lead on the Win32 side and it broke the glib 
> test program.  The glib test program compiles with warnings (turned 
> errors)!  Something to look into...

I've found a way around this issue and have introduced it into the same 
places in my tree on Unix as Ulf has on Windows so far.  It's a variable 
setup by the configure script that is tested in each directory's 
Makefile.am.  Now I just need to catch up fixing the Unix warnings I'm 
seeing in those directories :).

My addition to each configure.in (base dir and wiretap/):

    # Create the USING_GCC variable for use in Makefile.am files
    AM_CONDITIONAL(USING_GCC, test "x$GCC" != "x")

My addition to certain Makefile.am files (up at the top):

   if USING_GCC
   AM_CFLAGS = -Werror
   endif


Steve