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
This commit is contained in:
Dimitry Andric 2011-12-15 22:08:08 +00:00
parent 1926f2f6fa
commit e2325c4ac9

View File

@ -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)