Subject: misc/30097: CFLAGS+=-W when ${WARNS} > 3
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <roland.illig@gmx.de>
List: netbsd-bugs
Date: 04/30/2005 01:45:00
>Number:         30097
>Category:       misc
>Synopsis:       CFLAGS+=-W when ${WARNS} > 3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 30 01:45:00 +0000 2005
>Originator:     roland.illig@gmx.de
>Release:        NetBSD 2.99.15
>Organization:
	
>Environment:
	
	
System: NetBSD baccf5ee.roland-illig.de 2.99.15 NetBSD 2.99.15 (GENERIC) #0: Wed Feb 9 20:19:30 CET 2005 build@baccf5ee.roland-illig.de:/home/build/objroot/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
gcc provides the -W command line option which enables additional warnings.
It is generally not difficult to write good code that compiles without
warnings even when using this warning level.

One particular warnings is the -Wsign-compare class which is explicitly
excluded from the ${WARNS} > 0 case, but for ${WARNS} > 3 it makes sense.
Whoever sets the warning level that high will probably know how to fix
these warnings.
	
>How-To-Repeat:
	
>Fix:
	
# in <bsd.sys.mk>:
.if ${WARNS} > 3
CFLAGS+=	-W
.endif

>Unformatted: