Subject: Re: uninitialized vars
To: None <current-users@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: current-users
Date: 10/18/2005 12:58:54
In article <20051018095814.GA27321@localhost.localdomain>,
Jaka Jejcic  <jj@gnorw.net> wrote:
>On Tue, Oct 18, 2005 at 11:43:06AM +0200, Quentin Garnier wrote:
>> On Tue, Oct 18, 2005 at 11:38:28AM +0200, Jaka Jejcic wrote:
>> > Maybe you will all find this ridiculous but I find myself
>> > adding '= 0' or '= NULL' to many of the files and many of
>> > the variables each time I build the source tree just to
>> > get it compiled, because the build fails for uninitialized vars.
>> > 
>> > Am I doing something wrong? If not, why aren't those vars set to
>> > some appropriate value?
>> 
>> You'd better give a precise example.  And are you adding -W flags to
>> the build?
>
>example:
>./build.sh -T /usr/build/alpha/tools -M /usr/build/alpha/obj -D
>/usr/build/alpha/dist -R /usr/build/alpha/release -m alpha release
>
>it doesn't matter which arch i build for
>
>mk.conf:
>COPTS +=	-pipe -O
>MKNLS =         yes
>OBJMACHINE =    yes
>MKOBJDIRS =     yes
>MKHOSTOBJ =     yes
>UPDATE =        no
>BUILD =         yes
>X11SRCDIR =     /usr/xsrc
>X11_TYPE =      native
>
>well that's it...

We default to -O2 not to -O. Maybe that is your problem.

christos