Subject: bin/9639: init.c trivia
To: None <gnats-bugs@gnats.netbsd.org>
From: Patrick Welche,SCC,ext.35710, <prlw1@newn.cam.ac.uk>
List: netbsd-bugs
Date: 03/18/2000 07:27:05
>Number:         9639
>Category:       bin
>Synopsis:       avoid unused variable warning when compiling init
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 18 07:27:00 2000
>Last-Modified:
>Originator:     Patrick Welche
>Organization:
	
>Release:        1.4U (pre rc.d)
>Environment:
1.4U/i386
>Description:
cc1: warnings being treated as errors
/usr/src/sbin/init/init.c: In function `main':
/usr/src/sbin/init/init.c:192: warning: unused variable `c'
*** Error code 1
>How-To-Repeat:
Replace the CPPFLAGS line in src/sbin/init/Makefile with
CPPFLAGS+=-DLETS_GET_SMALL
which is the equivalent to src/distrib/utils/init_s/Makefile. The reason
this "error" doesn't show up in distrib/utils is that over there it is
compiled without -Wall
>Fix:
Index: init.c
===================================================================
RCS file: /cvsroot/basesrc/sbin/init/init.c,v
retrieving revision 1.36
diff -c -r1.36 init.c
*** init.c	2000/01/21 17:08:34	1.36
--- init.c	2000/03/18 15:12:31
***************
*** 189,195 ****
--- 189,197 ----
  	int argc;
  	char **argv;
  {
+ #ifndef LETS_GET_SMALL
  	int c;
+ #endif
  	struct sigaction sa;
  	sigset_t mask;
  
>Audit-Trail:
>Unformatted: