nmh-workers
[Top][All Lists]
Advanced

[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: Norman Shapiro
Subject: Re: [Nmh-workers] too many uninitialized variables in nmh-1.1 RC4
Date: Fri, 25 Nov 2005 16:58:11 -0800

Paul Fox <address@hidden> 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
    address@hidden




reply via email to

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