git: 188c455f3d7a - main - OFED: add -Wunused-but-set-variable to OFED_C

From: Siva Mahadevan <siva_at_FreeBSD.org>
Date: Mon, 28 Sep 2026 15:10:33 UTC
The branch main has been updated by siva:

URL: https://cgit.FreeBSD.org/src/commit/?id=188c455f3d7a137aeb9695dd0ba08a68d26c45f3

commit 188c455f3d7a137aeb9695dd0ba08a68d26c45f3
Author:     Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-09-28 15:07:23 +0000
Commit:     Siva Mahadevan <siva@FreeBSD.org>
CommitDate: 2026-09-28 15:07:29 +0000

    OFED: add -Wunused-but-set-variable to OFED_C
    
    This keeps it in sync with sys/modules/ibcore/Makefile and
    fixes the build on GCC 16 after the changes to -Wunused*[0].
    
    [0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused
    
    Reviewed by:    jhb
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D59539
---
 sys/conf/kern.pre.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 19a7b45f4b6a..347ff6ee90ff 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -273,7 +273,7 @@ LINUXKPI_C=		${NORMAL_C} ${LINUXKPI_INCLUDES}
 # Infiniband C flags.  Correct include paths and omit errors that linux
 # does not honor.
 OFEDINCLUDES=	-I$S/ofed/include -I$S/ofed/include/uapi ${LINUXKPI_INCLUDES}
-OFEDNOERR=	-Wno-cast-qual -Wno-pointer-arith
+OFEDNOERR=	-Wno-cast-qual -Wno-pointer-arith ${NO_WUNUSED_BUT_SET_VARIABLE}
 OFEDCFLAGS=	${CFLAGS:N-I*} -DCONFIG_INFINIBAND_USER_MEM \
 		${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR}
 OFED_C_NOIMP=	${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR}