Subject: misc/19482: SunOS.bsd.sys.mk problem
To: None <gnats-bugs@gnats.netbsd.org>
From: None <fcusack@fcusack.com>
List: netbsd-bugs
Date: 12/20/2002 19:14:44
>Number:         19482
>Category:       misc
>Synopsis:       The SunOS version of bsd.sys.mk has too many warnings
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 20 19:16:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Frank Cusack
>Release:        NetBSD 1.6
>Organization:
>Environment:
System: NetBSD moltar.savecore.net 1.6 NetBSD 1.6 (moltar) #16: Sun Nov 17 22:42:13 PST 2002 root@moltar.savecore.net:/usr/src/sys/arch/sparc64/compile/moltar sparc64
Architecture: sparc64
Machine: sparc64
>Description:
	For "zoularis", the bsd.sys.mk has too many -W warnings defined.
	The file with tag:
	    $NetBSD: SunOS.bsd.sys.mk,v 1.2 2002/12/03 14:07:08 grant Exp $
	is installed as /usr/pkg/share/bsd.sys.mk in "zoularis".  I don't
	know where this file really exists in the source tree, though.

>How-To-Repeat:
	Try to build the bmake package.
>Fix:
	Don't set -Wcast-qual and -Wwrite-strings at WARN level 1.

--- bsd.sys.mk.orig     Fri Dec 20 19:06:21 2002
+++ bsd.sys.mk  Fri Dec 20 19:07:42 2002
@@ -12,9 +12,12 @@
 CFLAGS+= -Wno-uninitialized
 .endif
 .if ${WARNS} > 1
-CFLAGS+=-Wreturn-type -Wcast-qual -Wpointer-arith -Wwrite-strings
+CFLAGS+=-Wreturn-type -Wpointer-arith
 CFLAGS+=-Wswitch -Wshadow
 .endif
+.if ${WARNS} > 2
+CFLAGS+=-Wcast-qual -Wwrite-strings
+.endif
 .endif
 
 .if defined(WFORMAT) && defined(FORMAT_AUDIT)
>Release-Note:
>Audit-Trail:
>Unformatted: