summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.sys.mk
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-12-15 22:08:08 +0000
committerdim <dim@FreeBSD.org>2011-12-15 22:08:08 +0000
commit634fe42a7686851f7c0235f4c2220cb4a89841ec (patch)
treec86f211d12342bb0085198f772f498dcecf469b3 /share/mk/bsd.sys.mk
parentb5cd6ab67fdbb336e943f41df3595dcfa1394853 (diff)
downloadFreeBSD-src-634fe42a7686851f7c0235f4c2220cb4a89841ec.zip
FreeBSD-src-634fe42a7686851f7c0235f4c2220cb4a89841ec.tar.gz
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
Diffstat (limited to 'share/mk/bsd.sys.mk')
-rw-r--r--share/mk/bsd.sys.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 796d169..1101995 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -57,6 +57,19 @@ CWARNFLAGS += -Wchar-subscripts -Winline -Wnested-externs\
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)
OpenPOWER on IntegriCloud