git: 615d289ffefe - main - Re-enable set but not used warnings for kernel builds.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Mon, 18 Apr 2022 23:11:51 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=615d289ffefe2b175f80caa9b1e113c975576472

commit 615d289ffefe2b175f80caa9b1e113c975576472
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-18 23:06:14 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-18 23:06:14 +0000

    Re-enable set but not used warnings for kernel builds.
    
    make tinderbox now passes with this warning enabled as a fatal error,
    so revert the change to hide it in preparation for making it fatal.
    
    This reverts commit e8e691983bb75e80153b802f47733f1531615fa2.
    
    Reviewed by:    imp, emaste
    Differential Revision:  https://reviews.freebsd.org/D34948
---
 sys/conf/kern.mk      | 6 +-----
 sys/conf/kern.opts.mk | 3 +--
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 67756b7fb986..f97be774ea10 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -43,11 +43,7 @@ CWARNEXTRA?=	-Wno-error=tautological-compare -Wno-error=empty-body \
 CWARNEXTRA+=	-Wno-error=shift-negative-value
 CWARNEXTRA+=	-Wno-address-of-packed-member
 .if ${COMPILER_VERSION} >= 130000
-.if ${MK_SET_BUT_NOTUSED_KERNEL_WARNINGS} == "no"
-CWARNEXTRA+=	${NO_WUNUSED_BUT_SET_VARIABLE}
-.else
-CWARNEXTRA+=	-Wno-error=unused-but-set-variable
-.endif
+CWARNFLAGS+=	-Wno-error=unused-but-set-variable
 .endif
 .endif	# clang
 
diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk
index 19789180ee93..077009baebf0 100644
--- a/sys/conf/kern.opts.mk
+++ b/sys/conf/kern.opts.mk
@@ -60,8 +60,7 @@ __DEFAULT_NO_OPTIONS = \
     INIT_ALL_ZERO \
     KERNEL_RETPOLINE \
     RATELIMIT \
-    REPRODUCIBLE_BUILD \
-    SET_BUT_NOTUSED_KERNEL_WARNINGS
+    REPRODUCIBLE_BUILD
 
 # Some options are totally broken on some architectures. We disable
 # them. If you need to enable them on an experimental basis, you