Subject: Re: Error compiling 1.4.1 kernel
To: Collin Baillie <>
From: Simon Burge <>
List: port-pmax
Date: 11/04/2001 14:21:32
"Collin Baillie" wrote:

> Aye,
> I'd say that it's nothing missing. If you look at the error messages, you're
> getting a warning. There's a variable called 'cp' that is defined but never
> used (ie wasting stack (?) space...) and there's a line saying cc has been
> told to treat warnings as errors (and halt the compile process) I'd say it's
> the -Werror option, but don't quote me.. try removing it or read man cc just
> to see, and it should not stop on warnings, but errors will. If there's just
> warnings though, it should compile.

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.

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

		char *cp;

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.

Simon Burge                            <>
NetBSD CDs, Support and Service: