svn commit: r228546 - head/share/mk

Dimitry Andric dim at FreeBSD.org
Thu Dec 15 22:08:08 UTC 2011


Author: dim
Date: Thu Dec 15 22:08:08 2011
New Revision: 228546
URL: http://svn.freebsd.org/changeset/base/228546

Log:
  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 after:	1 week

Modified:
  head/share/mk/bsd.sys.mk

Modified: head/share/mk/bsd.sys.mk
==============================================================================
--- head/share/mk/bsd.sys.mk	Thu Dec 15 22:07:36 2011	(r228545)
+++ head/share/mk/bsd.sys.mk	Thu Dec 15 22:08:08 2011	(r228546)
@@ -57,6 +57,19 @@ 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
+.   endif
+.   if ${WARNS} <= 2
+CWARNFLAGS	+=	-Wno-switch-enum
+.   endif
+.   if ${WARNS} <= 1
+CWARNFLAGS	+=	-Wno-parentheses
+.   endif
+.  endif
 . endif
 
 . if defined(FORMAT_AUDIT)


More information about the svn-src-head mailing list