Move NO_WUNUSED_BUT_SET_VARIABLE clang helper to the right place.

Reviewed by:	imp, dim, emaste
Sponsored by:	University of Cambridge, Google, Inc.
Differential Revision:	https://reviews.freebsd.org/D34537
This commit is contained in:
John Baldwin 2022-03-14 14:05:25 -07:00
parent 18207579a2
commit 2814ba8ef1

View File

@ -28,6 +28,9 @@ NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare
.if ${COMPILER_VERSION} >= 100000
NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation
.endif
.if ${COMPILER_VERSION} >= 130000
NO_WUNUSED_BUT_SET_VARIABLE= -Wno-unused-but-set-variable
.endif
.if ${COMPILER_VERSION} >= 140000
NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical
.endif
@ -90,10 +93,6 @@ CWARNFLAGS+= -Wno-format-zero-length
FORMAT_EXTENSIONS= -Wno-format
.elif ${COMPILER_TYPE} == "clang"
FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__
# Only newer versions of clang have -Wno-unused-but-set-variable
.if ${COMPILER_VERSION} >= 130000
NO_WUNUSED_BUT_SET_VARIABLE=-Wno-unused-but-set-variable
.endif
.else
FORMAT_EXTENSIONS= -fformat-extensions
.endif