From owner-dev-commits-src-branches@freebsd.org Thu Sep 2 21:53:41 2021 Return-Path: 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 8B5586684B8; Thu, 2 Sep 2021 21:53:41 +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 4H0vnd3Qx8z4SHf; Thu, 2 Sep 2021 21:53:41 +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 5D9B5207B5; Thu, 2 Sep 2021 21:53:41 +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 182LrfTA050669; Thu, 2 Sep 2021 21:53:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 182LrfLN050668; Thu, 2 Sep 2021 21:53:41 GMT (envelope-from git) Date: Thu, 2 Sep 2021 21:53:41 GMT Message-Id: <202109022153.182LrfLN050668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: d01fe93c3dc9 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: d01fe93c3dc9ea2157e9602e5ec9464a6b8a100f 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2021 21:53:41 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d01fe93c3dc9ea2157e9602e5ec9464a6b8a100f commit d01fe93c3dc9ea2157e9602e5ec9464a6b8a100f Author: Dimitry Andric AuthorDate: 2021-08-29 13:53:40 +0000 Commit: Dimitry Andric CommitDate: 2021-09-02 21:53:18 +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 56bddb35398b..f6767ba76a46 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