git: 86538266f8e5 - stable/13 - infiniband: Disable -Wredundant-decl warnings.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Tue, 10 May 2022 23:24:02 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=86538266f8e5937d5696435ef93370edbf2e501a

commit 86538266f8e5937d5696435ef93370edbf2e501a
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2021-09-15 16:03:18 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-05-10 22:51:49 +0000

    infiniband: Disable -Wredundant-decl warnings.
    
    ib_uverbs_flow_resources_free() is declard in two header files in
    upstream OFED.  Disable the warning to avoid introducing diffs to fix
    the build on GCC 9.
    
    While here, fix the ibcore module to disable the same warnings
    disabled in OFED_CFLAGS.
    
    Reviewed by:    hselasky
    Differential Revision:  https://reviews.freebsd.org/D31943
    
    (cherry picked from commit 44126818d2ec96d8247eafcae9b96905a473a264)
---
 sys/conf/kern.pre.mk        | 2 +-
 sys/modules/ibcore/Makefile | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 6be49642b04e..c4c63d591541 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -317,7 +317,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 -Wno-redundant-decls
 OFEDCFLAGS=	${CFLAGS:N-I*} -DCONFIG_INFINIBAND_USER_MEM \
 		${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR}
 OFED_C_NOIMP=	${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF}
diff --git a/sys/modules/ibcore/Makefile b/sys/modules/ibcore/Makefile
index 9d0717cf7df8..b2ab1ea2b317 100644
--- a/sys/modules/ibcore/Makefile
+++ b/sys/modules/ibcore/Makefile
@@ -42,3 +42,5 @@ CFLAGS+= -DINET6 -DINET -DCONFIG_INFINIBAND_USER_MEM
 EXPORT_SYMS=	YES
 
 .include <bsd.kmod.mk>
+
+CWARNFLAGS+= -Wno-cast-qual -Wno-pointer-arith -Wno-redundant-decls