Author: dim Date: Sat Dec 31 13:37:25 2011 New Revision: 229087 URL: http://svn.freebsd.org/changeset/base/229087
Log: MFC r228546: Clang has more warnings enabled by default, and when using -Wall, so if WARNS is set to low values, some of them have to be disabled explicitly. MFC r228551: Disable one more clang warning when WARNS <= 3. MFC r228606: Add a NO_WARRAY_BOUNDS setting to bsd.sys.mk, only applicable to clang, to selectively work around warnings in programs that don't use flexible array members, but instead define arrays of length 1 at the end of the struct, and then access those beyond their declared bounds. MFC r228617: Disable yet another clang warning when WARNS <= 3. MFC r228675: Disable yet another clang warning (-Wconversion) when WARNS <= 3. MFC r228677: Disable another clang warning (-Wempty-body) when WARNS <= 2. Modified: stable/9/share/mk/bsd.sys.mk Directory Properties: stable/9/share/mk/ (props changed) Modified: stable/9/share/mk/bsd.sys.mk ============================================================================== --- stable/9/share/mk/bsd.sys.mk Sat Dec 31 13:34:42 2011 (r229086) +++ stable/9/share/mk/bsd.sys.mk Sat Dec 31 13:37:25 2011 (r229087) @@ -57,6 +57,24 @@ CWARNFLAGS += -Wchar-subscripts -Winline CWARNFLAGS += -Wno-uninitialized . endif CWARNFLAGS += -Wno-pointer-sign +# Clang has more warnings enabled by default, and when using -Wall, so if WARNS +# is set to low values, these have to be disabled explicitly. +. if ${CC:T:Mclang} == "clang" +. if ${WARNS} <= 3 +CWARNFLAGS += -Wno-tautological-compare -Wno-unused-value\ + -Wno-parentheses-equality -Wno-unused-function\ + -Wno-conversion +. endif +. if ${WARNS} <= 2 +CWARNFLAGS += -Wno-switch-enum -Wno-empty-body +. endif +. if ${WARNS} <= 1 +CWARNFLAGS += -Wno-parentheses +. endif +. if defined(NO_WARRAY_BOUNDS) +CWARNFLAGS += -Wno-array-bounds +. endif +. endif . endif . if defined(FORMAT_AUDIT) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"