Don't error out on unused but set variables with clang 13

Clang 13.0.0 now has a -Wunused-but-set-variable warning similar to the
one gcc has had for quite a while. Since this triggers *very* often for
our kernel builds, don't make it a hard error, but leave the warning
visible so is some incentive to fix the instances.

MFC after:	3 days
This commit is contained in:
Dimitry Andric 2021-08-29 15:53:40 +02:00
parent 22b8ab15c4
commit 395d46caae

View File

@ -25,6 +25,9 @@ NO_WUNNEEDED_INTERNAL_DECL= -Wno-error=unneeded-internal-declaration
NO_WSOMETIMES_UNINITIALIZED= -Wno-error=sometimes-uninitialized
NO_WCAST_QUAL= -Wno-error=cast-qual
NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare
.if ${COMPILER_VERSION} >= 100000
NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation
.endif
# Several other warnings which might be useful in some cases, but not severe
# enough to error out the whole kernel build. Display them anyway, so there is
# some incentive to fix them eventually.
@ -33,8 +36,8 @@ CWARNEXTRA?= -Wno-error=tautological-compare -Wno-error=empty-body \
-Wno-error=pointer-sign
CWARNEXTRA+= -Wno-error=shift-negative-value
CWARNEXTRA+= -Wno-address-of-packed-member
.if ${COMPILER_VERSION} >= 100000
NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation
.if ${COMPILER_VERSION} >= 130000
CWARNFLAGS+= -Wno-error=unused-but-set-variable
.endif
.endif # clang