aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-08-26 15:36:03 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-09-19 08:16:19 +0000
commit371456b17b0f0290db1fb8fc57f67a29dc943549 (patch)
tree13b33c1013857263e88ed186fc5760083466475f
parent304bf88ad91e08fc61787b0de5ec43676df9c398 (diff)
downloadsrc-371456b17b0f0290db1fb8fc57f67a29dc943549.tar.gz
src-371456b17b0f0290db1fb8fc57f67a29dc943549.zip
Add -Wno-error=unused-but-set-variable when building with Clang 13+
This warning triggers many times while building world. Downgrade it to a warning until all occurrences have been fixed. Once the Clang warnings have been fixed we should be able to turn it on for GCC as well. See also f4fed768bba45a406f73ed1491d7e52fd1a8711d which did the same for the kernel builds. Reviewed by: arichardson, imp Differential Revision: https://reviews.freebsd.org/D31927 (cherry picked from commit 45feade38ec3e8e30086dedc6ee81cbf816293e3)
-rw-r--r--share/mk/bsd.sys.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 26f5c59063ae..e787d4f439df 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -84,6 +84,9 @@ CWARNFLAGS.clang+= -Wno-empty-body -Wno-string-plus-int
.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30400
CWARNFLAGS.clang+= -Wno-unused-const-variable
.endif
+.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000
+CWARNFLAGS.clang+= -Wno-error=unused-but-set-variable
+.endif
.endif # WARNS <= 6
.if ${WARNS} <= 3
CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-unused-value\