git: 70f18afe3929 - stable/15 - OFED: add -Wunused-but-set-variable to OFED_C
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 07 Oct 2026 23:58:16 UTC
The branch stable/15 has been updated by siva:
URL: https://cgit.FreeBSD.org/src/commit/?id=70f18afe3929c2303d506b13f49cb1fc5ad09028
commit 70f18afe3929c2303d506b13f49cb1fc5ad09028
Author: Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-09-28 15:07:23 +0000
Commit: Siva Mahadevan <siva@FreeBSD.org>
CommitDate: 2026-10-07 23:53:06 +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
(cherry picked from commit 188c455f3d7a137aeb9695dd0ba08a68d26c45f3)
---
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 73551f56f8b8..e339a6317b47 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -270,7 +270,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}