From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 23:59:00 2021 Return-Path: <owner-dev-commits-src-branches@freebsd.org> Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3375E66A1EF; Thu, 2 Sep 2021 23:59:00 +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 4H0yZC5Pktz3M2B; Thu, 2 Sep 2021 23:58:59 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 7094122602; Thu, 2 Sep 2021 23:58:59 +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 182Nwx9A011013; Thu, 2 Sep 2021 23:58:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182Nwxvq011012; Thu, 2 Sep 2021 23:58:59 GMT (envelope-from git) Date: Thu, 2 Sep 2021 23:58:59 GMT Message-Id: <202109022358.182Nwxvq011012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric <dim@FreeBSD.org> Subject: git: f4fed768bba4 - stable/12 - Don't error out on unused but set variables with clang 13 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f4fed768bba45a406f73ed1491d7e52fd1a8711d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository <dev-commits-src-branches.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/dev-commits-src-branches>, <mailto:dev-commits-src-branches-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/dev-commits-src-branches/> List-Post: <mailto:dev-commits-src-branches@freebsd.org> List-Help: <mailto:dev-commits-src-branches-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/dev-commits-src-branches>, <mailto:dev-commits-src-branches-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 02 Sep 2021 23:59:00 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f4fed768bba45a406f73ed1491d7e52fd1a8711d commit f4fed768bba45a406f73ed1491d7e52fd1a8711d Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2021-08-29 13:53:40 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2021-09-02 23:30:30 +0000 Don't error out on unused but set variables with clang 13 Clang 13.0.0 now has a -Wunused-but-set-variable warning similar to the one gcc has had for quite a while. Since this triggers *very* often for our kernel builds, don't make it a hard error, but leave the warning visible so is some incentive to fix the instances. (cherry picked from commit 395d46caaed73228b84dfaeb37c702304a46ba8f) --- sys/conf/kern.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index d87752649679..34ffc8cb15ca 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -25,6 +25,9 @@ NO_WUNNEEDED_INTERNAL_DECL= -Wno-error=unneeded-internal-declaration NO_WSOMETIMES_UNINITIALIZED= -Wno-error=sometimes-uninitialized NO_WCAST_QUAL= -Wno-error=cast-qual NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare +.if ${COMPILER_VERSION} >= 100000 +NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation +.endif # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. @@ -33,8 +36,8 @@ CWARNEXTRA?= -Wno-error=tautological-compare -Wno-error=empty-body \ -Wno-error=pointer-sign CWARNEXTRA+= -Wno-error=shift-negative-value CWARNEXTRA+= -Wno-address-of-packed-member -.if ${COMPILER_VERSION} >= 100000 -NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation +.if ${COMPILER_VERSION} >= 130000 +CWARNFLAGS+= -Wno-error=unused-but-set-variable .endif .endif # clang