Subject: bin/36626: shutdown(8) fails to compile if DEBUG is defined
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <j+nbsd@2007.salmi.ch>
List: netbsd-bugs
Date: 07/10/2007 21:05:00
>Number: 36626
>Category: bin
>Synopsis: shutdown(8) fails to compile if DEBUG is defined
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 10 21:05:00 +0000 2007
>Originator: Jukka Salmi
>Release: NetBSD 4.99.22
>Environment:
System: NetBSD moray.salmi.ch 4.99.22 NetBSD 4.99.22 (MORAY.APM) #0: Sun Jul 1 21:35:18 CEST 2007 build@moray.salmi.ch:/b/build/nbsd/c/i386/sys/arch/i386/compile/MORAY.APM i386
Architecture: i386
Machine: i386
>Description:
src/sbin/shutdown fails to compile if DEBUG is defined.
>How-To-Repeat:
Define DEBUG and try to build src/sbin/shutdown.
>Fix:
Index: sbin/shutdown/shutdown.c
===================================================================
RCS file: /cvsroot/src/sbin/shutdown/shutdown.c,v
retrieving revision 1.47
diff -u -p -r1.47 shutdown.c
--- sbin/shutdown/shutdown.c 14 Mar 2007 03:52:28 -0000 1.47
+++ sbin/shutdown/shutdown.c 10 Jul 2007 19:43:55 -0000
@@ -362,7 +362,9 @@ die_you_gravy_sucking_pig_dog(void)
if (doreboot || dohalt) {
const char *args[16];
const char **arg, *path;
+#ifndef DEBUG
int serrno;
+#endif
arg = &args[0];
if (doreboot) {