Subject: Re: Error compiling 1.4.1 kernel
To: NetBSD/pmax <port-pmax@netbsd.org>
From: Iggy Drougge <optimus@canit.se>
List: port-pmax
Date: 11/03/2001 22:17:51
Simon Burge skrev:

>Collin is pretty much right - we enable warnings so that we can catch
>errors.  In this case, if the -Werror were disabled and you had any sort
>of optimising enabled (-O or -O2) gcc wouldn't even allocate a register
>or the stack space for the variable if it's unused.

Last time I tried to compile things (Roxen =) which gave a lot of warnings, I
just ended up with a big mess. It seemed alive, but wasn't.

>Changing the declaration of cp to include a check for NRASTERCONSOLE
>like the following should do the trick.

>   #if NRASTERCONSOLE > 0
>       char *cp;
>   #endif

I'm afraid that didn't do the trick. I put it in all three instances of #if
NRASTERCONSOLE.

../../../../arch/pmax/dev/dc.c: In function `dcrint':
../../../../arch/pmax/dev/dc.c:755: warning: unused variable `cp'

What's even more odd is that, as far as I with my almost non-existant C
knowledge may find out, "cp" is used a whole lot in "dcrint".

>If that works please let me know and I'll send a pull-up so that it will
>be included in any future 1.4 releases (although I don't know how likely
>that actually is).

>Also, if you're sticking to 1.4 vintage kernels you might do well
>to upgrade to NetBSD-1.4.3 - there's been a number of bug fixes and
>security updates since 1.4.1.  You can also track the 1.4 branch to get
>any changes since the 1.4.3 release was made.

Thanks, I will. I just though I'd get the hang of building custom kernels
before introducing unknown elements into the system, which is quite stable
ATM.

--
En ligne avec Thor 2.6a.

     /"\
     \ /    ASCII Ribbon
      X   Campaign Against
     / \     HTML Mail!