git: 98d06eea14a5 - main - sys: Enable -Wunused-but-set-variable for clang 15+.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 25 May 2023 17:45:05 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=98d06eea14a5056e22328140fee517a4f0612bf8
commit 98d06eea14a5056e22328140fee517a4f0612bf8
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-05-25 17:44:53 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-05-25 17:44:53 +0000
sys: Enable -Wunused-but-set-variable for clang 15+.
It was already enabled for older clang versions and GCC.
---
sys/conf/kern.mk | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index be7e452bb6e3..9e977a6e4a01 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -46,12 +46,6 @@ 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} >= 150000
-# Clang 15 has much more aggressive diagnostics about
-# unused-but-set variables. Make these
-# non-fatal for the time being.
-CWARNEXTRA+= -Wno-error=unused-but-set-variable
-.endif
.endif # clang
.if ${COMPILER_TYPE} == "gcc"