diff options
Diffstat (limited to 'share/mk/bsd.sys.mk')
-rw-r--r-- | share/mk/bsd.sys.mk | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 796d169..7a72ca6 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -57,6 +57,24 @@ 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\ + -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) |