NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/41451: GENERIC_TINY build breaks due to warnings being treated as errors

>Number:         41451
>Category:       kern
>Synopsis:       GENERIC_TINY build breaks due to warnings being treated as 
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 17 17:15:01 +0000 2009
>Originator:     Stathis Kamperis
>Release:        Host is NetBSD 5.0. Failure refers to -current.
Aristotle University of Thessaloniki
NetBSD voyager 5.0 NetBSD 5.0 (GENERIC) #0: Sun Apr 26 18:50:08 UTC 2009

During the build process of GENERIC_TINY it fails with:

cc1: warnings being treated as errors
/usr/src/sys/arch/x86/x86/x86_autoconf.c: In function 'device_register':
/usr/src/sys/arch/x86/x86/x86_autoconf.c:505: warning: unused variable 

The problem is that an #ifdef disables a portion of code where `found_console' 
is used, resulting in the above error. Later on I get a similar error regarding 
a function that is 'defined but never used'.

I attach a patch that fixes this issues by moving the variable declaration and 
function *inside* the #ifdef - #endif block.

Try to build GENERIC_TINY under -current.
[stathis@voyager /usr/src/sys/arch/x86/x86] cvs diff
cvs diff: Diffing .
Index: x86_autoconf.c
RCS file: /cvsroot/src/sys/arch/x86/x86/x86_autoconf.c,v
retrieving revision 1.40
diff -r1.40 x86_autoconf.c
> #if NPCI > 0
> #endif
<       static bool found_console = false;
>       static bool found_console = false;
[stathis@voyager /usr/src/sys/arch/x86/x86] 

Home | Main Index | Thread Index | Old Index