From nobody Mon Feb 07 20:50:33 2022 X-Original-To: dev-commits-src-main@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 2309519BE887; Mon, 7 Feb 2022 20:50:34 +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 4Jsyvt0CW0z4hGp; Mon, 7 Feb 2022 20:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644267034; 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=jjCSiUeW4vCnQL2G4S+7vLsjdl8mHipMHZd+HajsYSY=; b=Zx6HQXTs0whFa9os4J0oRe0J0O4FgzOTj05Lk5gebsdxbzsIUWKh07ofk/EVoRmeSDsJHw 4RaoHfAM2JgILTBUg0QLPAdAclUuhz7d3JNxqj2SaT557eb4eSM2lGcAhzGALv7s9gfdqZ enBc6NT3giaM61C2PNt0pg41iFJ1ANU93wVn/epzalMnGHrTfox33PApmwcej1bGXfBjOx DW0qCGNynGn0d8M/hIjC36cFwHj484CL0eiMftoG87cCsSMaADLhpIRGQxF7A0gjLI1o/s fCTjyP+eDA91rMdKt2xIv0cY9dPmtSp2MfkDC8hF4ypUxO5iPYLV5E4qtxw2ow== 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 CE8F84971; Mon, 7 Feb 2022 20:50:33 +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 217KoX7H046222; Mon, 7 Feb 2022 20:50:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 217KoXx5046221; Mon, 7 Feb 2022 20:50:33 GMT (envelope-from git) Date: Mon, 7 Feb 2022 20:50:33 GMT Message-Id: <202202072050.217KoXx5046221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c227269e2f9d - main - Stop adding -Wredundant-decls to CWARNFLAGS. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: c227269e2f9dc2695d00be9e5a72b5fdeec5712a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644267034; 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=jjCSiUeW4vCnQL2G4S+7vLsjdl8mHipMHZd+HajsYSY=; b=hll1PrCzc1zbQSYjTYPicw41fPACmydXUj62n/a/aEjiGzsD9JZhEaYKYLodEAKLKmxn3S rVtgQL9jksX143jHwS0okVD9JOmpGTeA+hx79x7fYf1SsOjr/2oU1PCBuL9scQHElpm7r8 R9q2x7hY1tGhbkHueyKVxhD642s3W0s5U29CN9s1PRKbMc3wAqpJFM+DrBYlZ+SpBT9mfF 5WIimcBoBOueGrotCqG0uCtHmrbZhpWLds89brBwfLluSNV0pNcqVhQj5pmSAtMSK7Uknl YaNCuE+o3abEtqE3xPG5r1PnlNh21/8uFlYfG5Pg8Psc12norwGEbLLinqjJMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644267034; a=rsa-sha256; cv=none; b=Nvef0zXP3f2mEGD9wR8GufclC5s7sUumNlpgE2mSuVTqBXV/ghm7/BXv70e8fgdLpYxkoN QekkvI9ujARCyfdG4FkBNmYQc3iAvTqUoEZyjHvhW9ZwEkYplgk+zwckWjQzBjsV6kIvfq rajUE2VO72txh05/+k3BQVNp+z0ZCOtC33eRC+/63TW6LlXdq3ENSlWFQfWM6Rjyuv0ClV e7AMf7o161ia+KEXPg36gZXEckEf0g+Bpv4NZDLe9PVwL4aPgzjMc3+GDOINapB0Wj0vuD l7Aq3bA7ORyRfPSfz0lRtZF9uih07D4pEcNGr3m/QJrXkdvx/kiy/hthy1QDVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c227269e2f9dc2695d00be9e5a72b5fdeec5712a commit c227269e2f9dc2695d00be9e5a72b5fdeec5712a Author: John Baldwin AuthorDate: 2022-02-07 20:47:51 +0000 Commit: John Baldwin CommitDate: 2022-02-07 20:47:51 +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 --- 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 14b643fe0a20..13be4c1442fc 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 @@ -163,7 +163,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 3d71f9e2b5e2..b009d64324da 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 ac0580927ef8..8c753783b527 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -228,7 +228,6 @@ CDDL_CFLAGS= \ -Wno-nested-externs \ -Wno-parentheses \ -Wno-pointer-arith \ - -Wno-redundant-decls \ -Wno-strict-prototypes \ -Wno-switch \ -Wno-undef \ @@ -298,7 +297,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} diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 54d57b069435..e01a982d4793 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -544,8 +544,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 d3fc9096f315..4cabde88f885 100644 --- a/sys/modules/ibcore/Makefile +++ b/sys/modules/ibcore/Makefile @@ -56,4 +56,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 \