Skip to content
Browse files

Stop suppressing -Wuninitialized in userland for WARNS >= 2 and <= 4.

This is from 2001 (via FreeBSD, who still have it). Since a lot of
important stuff is in that WARNS range (libc, most prominently) and
since the option has found some good bugs for us (just see the MFCs
of recent days), we definitely want it to be enabled. None of the
issues it reported turned out to be a false positive.

Do, however, turn off -Wmaybe-uninitialized in that WARNS range for
now.

Also, while here, turn on -Winit-self too.
  • Loading branch information...
1 parent b947207 commit dbf753c58e1eb879d613e2d0393bf66dcad381e4 Sascha Wildner committed Feb 26, 2014
Showing with 3 additions and 3 deletions.
  1. +3 −3 share/mk/bsd.sys.mk
View
6 share/mk/bsd.sys.mk
@@ -29,7 +29,7 @@ CWARNFLAGS += -Werror
. endif
. endif
. if ${WARNS} >= 2
-CWARNFLAGS += -Wall -Wformat-security -Wno-pointer-sign
+CWARNFLAGS += -Wall -Wformat-security -Winit-self -Wno-pointer-sign
. endif
. if ${WARNS} >= 3
CWARNFLAGS += -Wextra -Wno-unused-parameter -Wstrict-prototypes\
@@ -45,9 +45,9 @@ CWARNFLAGS += -Wchar-subscripts -Winline -Wnested-externs\
-Wredundant-decls
. endif
. if ${WARNS} >= 2 && ${WARNS} <= 4
-# XXX Delete -Wuninitialized by default for now -- the compiler doesn't
+# XXX Delete -Wmaybe-uninitialized by default for now -- the compiler doesn't
# XXX always get it right.
-CWARNFLAGS += -Wno-uninitialized
+CWARNFLAGS += -Wno-maybe-uninitialized
. endif
# Activate gcc47's -Wunused-but-set-variable (which is in -Wall) and
# -Wunused-but-set-parameter (which is in -Wextra) only at WARNS >= 4

0 comments on commit dbf753c

Please sign in to comment.
Something went wrong with that request. Please try again.