Ethereal-dev: Re: [Ethereal-dev] Patch: Turn on additional gcc warnings

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: Tue, 22 May 2001 20:40:20 +0200
On Mon, May 21, 2001 at 10:19:28PM -0700, Guy Harris wrote:
> > the attached patch adds -W -Wno-unused to the compile flags of gcc.
> 
> Would that combination suppress warnings about unused variables, as well
> as unused parameters?

Unfortunately yes, I haven't found an option to turn off unused parameters
alone.

> "-Wsign-compare" would turn on the signed-comparison warnings, although,
> unfortunately, there don't appear to be options to turn on the other
> warnings that require "-W" in 2.95[.x], such as the warning if "A
> nonvolatile automatic variable might be changed by a call to longjmp"
> (which I think older compilers warn about with just "-Wall"), or the
> warning if "A function can return either with or without a value", etc..

-Wsign-compare doesen't even turn on the warning:
"comparison of unsigned expression < 0 is always false"

> (Sigh.  *WHY* did the GCC people bundle a large collection of warnings
> under "-W", with no way of selectively turning them on or off?)

I've been wondering about that too - and for far too long already. Maybe
I should ask them :-)

 Ciao
       J�rg

-- 
Joerg Mayer                                          <jmayer@xxxxxxxxx>
I found out that "pro" means "instead of" (as in proconsul). Now I know
what proactive means.