Subject: bin/2373: Another "void main(...)"
To: None <gnats-bugs@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: netbsd-bugs
Date: 05/05/1996 07:24:39
>Number:         2373
>Category:       bin
>Synopsis:       Another "void main(...)"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May  5 07:35:03 1996
>Last-Modified:
>Originator:     der Mouse
>Organization:
	Dis-
>Release:        -current sup of Saturday AM
>Environment:
	SPARC IPC, but it doesn't matter
>Description:
	There's another declared-as-void main(), in bootpgw.c.  With
	gcc fixed to detect this, bootpgw refuses to build:

	cc -O -DSYSLOG -DDEBUG -I/space/sources/working-usr-src/usr.sbin/bootpgw/../bootpd  -Werror  -c /space/sources/working-usr-src/usr.sbin/bootpgw/../bootpd/bootpgw.c
	cc1: warnings being treated as errors
	/space/sources/working-usr-src/usr.sbin/bootpgw/../bootpd/bootpgw.c:156: warning: return type of `main' is not `int'
>How-To-Repeat:
	Apply the gcc patch to get this warning, then try to build
	bootpgw.
>Fix:
	Fix the declaration, of course.  Fortunately, in this case
	nothing else seems to need to be done.

--- OLD/usr.sbin/bootpd/bootpgw.c	Thu Jan  1 00:00:00 1970
+++ NEW/usr.sbin/bootpd/bootpgw.c	Thu Jan  1 00:00:00 1970
@@ -151,7 +151,7 @@
  * main server loop is started.
  */
 
-void
+int
 main(argc, argv)
 	int argc;
 	char **argv;

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu
>Audit-Trail:
>Unformatted: