nmh-workers
[Top] [All Lists]

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

2005-11-25 17:58:42
Paul Fox <pgf@foxharp.boston.ma.us> writes:
initialisation. The question is how to deal with these because it'd be
nice if we could prevent the compiler warnings. In some ways I think it
is wrong to needlessly assign 0 to such variables because it implies to
someone reading the code that the variable needs to be initialised to 0
and that that value has a purpose.

I often have a manfiest constant WHO_CARES,

#define WHO_CARES (void*)012345

isn't sort of setting yourself up for shooting yourself in the foot, in case 
the
program logic _is_ wrong, and you didn't notice?  in general i take the course
of safety, and initialize to something that will cause the least pain if it
did get used.

I usually take the opposite course, or at least try to. I want to know about
errors in program logic as soon and as often as possible. I would rather that
bugs hit me when I can do something about them.

I grant that your approach has its merits.


    Norman Shapiro
    798 Barron Avenue
    Palo Alto CA 94306-3109
    (650) 565-8215
    norm@dad.org


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

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