nmh-workers
[Top] [All Lists]

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

2005-11-25 20:20:41

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.

-- 
    JB


_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>