Don't add -Wno-uninitialized to CFLAGS if WARNS > 0 and HAVE_GCC != no,
as gcc3 generates much less false positives for -Wuninitalized and I have found genuine bugs with this warning enabled. Tested by building a full release of NetBSD/i386.
This commit is contained in:
parent
cc2834abee
commit
87b3e94478
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.sys.mk,v 1.118 2005/05/31 03:45:42 christos Exp $
|
||||
# $NetBSD: bsd.sys.mk,v 1.119 2005/06/04 12:17:45 lukem Exp $
|
||||
#
|
||||
# Build definitions used for NetBSD source tree builds.
|
||||
|
||||
|
@ -16,10 +16,10 @@ CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
|
|||
# differently in traditional and ansi environments' which is the warning
|
||||
# we wanted, and now we don't get anymore.
|
||||
CFLAGS+= -Wno-sign-compare -Wno-traditional
|
||||
# XXX Delete -Wuninitialized by default for now -- the compiler doesn't
|
||||
# XXX always get it right.
|
||||
.if !defined(HAVE_GCC3) || (${HAVE_GCC3} == "no")
|
||||
CFLAGS+= -Wno-uninitialized
|
||||
.endif
|
||||
.endif
|
||||
.if ${WARNS} > 1
|
||||
CFLAGS+= -Wreturn-type -Wswitch -Wshadow
|
||||
.endif
|
||||
|
|
Loading…
Reference in New Issue