From nobody Wed Mar 22 16:32:54 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PhYtH0JmWz412LX; Wed, 22 Mar 2023 16:32:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PhYtG6gdqz3QXt; Wed, 22 Mar 2023 16:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679502774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QxsS2dP7WLvRdGvCy4WnLHwAAXsdd+3l2BIWoUWuZAU=; b=DN0EUAj4y86kOeLFuPowa/n1BXQ5xVY6OgEp18HIukZb3U54ZCoQwcQOizrPCrtJYitno/ G7xrcZRmGrAf6NCN/XYuZM4ws/hs3IwGG5IFzfLJqJdx4NhoBlkTn/7I7B20tep0Wm1BVa CxlYi/UEdObHhu4cu6UxqUieN1bgtWDLXEO+PwnQlP4GHJ8XgLQz1ezUStNGfVOPQyZoI5 L00mRLgSpLlXJFXvP5X4dAwuKoWK7u8uEOdsED7XmWA7S4ZA0HBuPc00VOd7yRU7AGxSoP ohD+ZjLNx2jS5ueB4Pq2719jrF1j/9tSLKGVGXfngxUzP1UveBDwhdpBsesf8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679502774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QxsS2dP7WLvRdGvCy4WnLHwAAXsdd+3l2BIWoUWuZAU=; b=kO9h2ZEwVidZQnkH8AbdOwxmc2qGwpABpFN4O53rIAa5m3JJ4CXWnGWfG5J5UeHY2k9Gms F8WGfMPkEeV/IGuSOMD6NHZSH5RcmNlyk948DFrYTTSJ51uEF5Yfr7+dQECfA+4A3X1udt McnRuELGMCgTz+/4TbIrLlcTYAWDzexri7mveNuOVVZ5rleRyFbMr8RWX5n43TMkAxXRRq 9gsVfIYb4QwiS3tnwHJo/SU5pbhA8ygWqx4DQqwcuH69EqXV/6A2ZnQFzivG+jZziM++k7 8WPkZKKvElaTMUmkYOjE7cBLpMuTEP72KnLT8iDr9e/TXXvOHymB+PS932uImw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679502774; a=rsa-sha256; cv=none; b=ZTqff/FCru/7xtBytlMwU7LnQhNKsFlzPcXOCE8Mk6QaN0RQCTVKd0qCWPQuGrUeVlKS66 D5M7JHhBkVBVMoa8i82OJOIvKPL/uIeIEwofEtH2ggCjI3HMh5834olRTu4Ijp8ONuqbxH K4PaVmdwEaHSljyRrs9+alLv9pjjZldJAaaGGBBFhnvJgp3oTF/ev8RBm+mDFfUyZsk9gj G6/Kdd73BXtE5WxIpFFDr3x63yUrIxGkuzbsN1rmIdCGrtLWbsb3fHEynhhaMePOtbyCBD 4XTwQWr3GWG/OdX53fHZSkWhlTbu1r6gSZ+4rWHkss7rBCgZaO+E3oms5rwafA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PhYtG5XLrz11Jt; Wed, 22 Mar 2023 16:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32MGWsld024064; Wed, 22 Mar 2023 16:32:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32MGWsoq024063; Wed, 22 Mar 2023 16:32:54 GMT (envelope-from git) Date: Wed, 22 Mar 2023 16:32:54 GMT Message-Id: <202303221632.32MGWsoq024063@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 419f53cb21eb - stable/13 - Stop adding -Wredundant-decls to CWARNFLAGS. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 419f53cb21eba7aa22990d65e7a4656dcf8b3725 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=419f53cb21eba7aa22990d65e7a4656dcf8b3725 commit 419f53cb21eba7aa22990d65e7a4656dcf8b3725 Author: John Baldwin AuthorDate: 2022-02-07 20:47:51 +0000 Commit: John Baldwin CommitDate: 2023-03-22 15:22:07 +0000 Stop adding -Wredundant-decls to CWARNFLAGS. clang doesn't implement it, and Linux doesn't enforce it. As a result, new instances keep cropping up both in FreeBSD's code and in upstream sources from vendors. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D34144 (cherry picked from commit c227269e2f9dc2695d00be9e5a72b5fdeec5712a) --- share/mk/bsd.sys.mk | 3 +-- sys/conf/Makefile.powerpc | 1 - sys/conf/kern.mk | 2 +- sys/conf/kern.pre.mk | 3 +-- sys/conf/kmod.mk | 3 +-- sys/modules/ibcore/Makefile | 2 +- sys/powerpc/conf/QORIQ64 | 2 +- sys/powerpc/conf/dpaa/DPAA | 2 +- sys/powerpc/conf/dpaa/config.dpaa | 1 - 9 files changed, 7 insertions(+), 12 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 9e41fefc4fe4..25e2c9787329 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -60,7 +60,7 @@ CWARNFLAGS+= -Wcast-align .endif # !NO_WCAST_ALIGN !NO_WCAST_ALIGN.${COMPILER_TYPE} .endif # WARNS >= 4 .if ${WARNS} >= 6 -CWARNFLAGS+= -Wchar-subscripts -Wnested-externs -Wredundant-decls\ +CWARNFLAGS+= -Wchar-subscripts -Wnested-externs \ -Wold-style-definition .if !defined(NO_WMISSING_VARIABLE_DECLARATIONS) CWARNFLAGS.clang+= -Wmissing-variable-declarations @@ -172,7 +172,6 @@ CWARNFLAGS+= -Wno-error=address \ CWARNFLAGS+= -Wno-error=empty-body \ -Wno-error=maybe-uninitialized \ -Wno-error=nonnull-compare \ - -Wno-error=redundant-decls \ -Wno-error=shift-negative-value \ -Wno-error=tautological-compare \ -Wno-error=unused-const-variable diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index a933c6b42090..839fde10f9b2 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -53,7 +53,6 @@ DPAAWARNFLAGS += \ -Wno-error=enum-conversion .elif "${COMPILER_TYPE}" == "gcc" DPAAWARNFLAGS += \ - -Wno-error=redundant-decls \ -Wno-error=int-in-bool-context .endif diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 13cf41f05a24..1144522c357b 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -3,7 +3,7 @@ # # Warning flags for compiling the kernel and components of the kernel: # -CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ +CWARNFLAGS?= -Wall -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Wcast-qual \ -Wundef -Wno-pointer-sign ${FORMAT_EXTENSIONS} \ -Wmissing-include-dirs -fdiagnostics-show-option \ diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 6af49075cae8..5fba3e58295b 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -249,7 +249,6 @@ CDDL_CFLAGS= \ -Wno-nested-externs \ -Wno-parentheses \ -Wno-pointer-arith \ - -Wno-redundant-decls \ -Wno-strict-prototypes \ -Wno-switch \ -Wno-undef \ @@ -320,7 +319,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 -Wno-redundant-decls +OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith 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/conf/kmod.mk b/sys/conf/kmod.mk index 2a2ab1d02277..134b150af1d9 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -551,8 +551,7 @@ OPENZFS_CFLAGS= \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h OPENZFS_CWARNFLAGS= \ - -Wno-nested-externs \ - -Wno-redundant-decls + -Wno-nested-externs .include .include diff --git a/sys/modules/ibcore/Makefile b/sys/modules/ibcore/Makefile index 801fcf9345ef..64444bd9925b 100644 --- a/sys/modules/ibcore/Makefile +++ b/sys/modules/ibcore/Makefile @@ -43,4 +43,4 @@ EXPORT_SYMS= YES .include -CWARNFLAGS+= -Wno-cast-qual -Wno-pointer-arith -Wno-redundant-decls +CWARNFLAGS+= -Wno-cast-qual -Wno-pointer-arith diff --git a/sys/powerpc/conf/QORIQ64 b/sys/powerpc/conf/QORIQ64 index 4131ed5935b5..5db473c5393b 100644 --- a/sys/powerpc/conf/QORIQ64 +++ b/sys/powerpc/conf/QORIQ64 @@ -14,7 +14,7 @@ machine powerpc powerpc64 include "dpaa/config.dpaa" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols makeoptions WITH_CTF=1 -#makeoptions WERROR="-Werror -Wno-format -Wno-redundant-decls" +#makeoptions WERROR="-Werror -Wno-format" options FPU_EMU diff --git a/sys/powerpc/conf/dpaa/DPAA b/sys/powerpc/conf/dpaa/DPAA index 23b708591378..4032c2ddd446 100644 --- a/sys/powerpc/conf/dpaa/DPAA +++ b/sys/powerpc/conf/dpaa/DPAA @@ -12,7 +12,7 @@ cpu BOOKE_E500 machine powerpc powerpc #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -#makeoptions WERROR="-Werror -Wno-format -Wno-redundant-decls" +#makeoptions WERROR="-Werror -Wno-format" makeoptions NO_MODULES=yes # Platform support diff --git a/sys/powerpc/conf/dpaa/config.dpaa b/sys/powerpc/conf/dpaa/config.dpaa index a40e3e5ea8bc..6161eb7db4a6 100644 --- a/sys/powerpc/conf/dpaa/config.dpaa +++ b/sys/powerpc/conf/dpaa/config.dpaa @@ -6,7 +6,6 @@ makeoptions DPAA_COMPILE_CMD="${LINUXKPI_C} ${DPAAWARNFLAGS} \ -Wno-cast-qual -Wno-unused-function -Wno-init-self -fms-extensions \ -include $S/contrib/ncsw/build/dflags.h \ -Wno-error=missing-prototypes \ - -Wno-redundant-decls \ -I$S/contrib/ncsw/build/ \ -I$S/contrib/ncsw/inc \ -I$S/contrib/ncsw/inc/cores \