[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] too many uninitialized variables in nmh-1.1 RC4

From: Josh Bressers
Subject: Re: [Nmh-workers] too many uninitialized variables in nmh-1.1 RC4
Date: Fri, 25 Nov 2005 22:20:06 -0500

> > I often have a manfiest constant WHO_CARES,
> > 
> > #define WHO_CARES (void*)012345
> #define WHO_CARES 0xdeadbeef
> int foo = WHO_CARES;
> Has the advantage that if you *do* make it through the code without actually
> setting a known good value, you'll probably get a SIGSEGV or other blatantly
> obvious indication that things have gone very very awry. '12345' doesn't 
> always
> do that for you....

This thread has reached a point of silliness.  The warning in question is
just a warning, it doesn't mean there is a problem, it means gcc thinks
there may be something that the developer should look at.  Chances are good
that the logic does have a flaw.  gcc will analyze the source and warn when
it thinks it's possible for a variable to remain unassigned before it's
used.  Setting a variable to an arbitrary value to get a warning to go away
is a recipe for disaster.  If this really bothers you, turn off -Wall.  If
you want to do clever things for debugging purposes, you should investigate
the malloc perturbing code in newer glibc.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]