From owner-dev-commits-src-branches@freebsd.org Sun Sep 19 08:17:19 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 A08BB6AEE93; Sun, 19 Sep 2021 08:17:19 +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 4HC0sq3Vlnz4kvp; Sun, 19 Sep 2021 08:17:19 +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 4D0491977C; Sun, 19 Sep 2021 08:17:19 +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 18J8HJwP028957; Sun, 19 Sep 2021 08:17:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18J8HJCK028956; Sun, 19 Sep 2021 08:17:19 GMT (envelope-from git) Date: Sun, 19 Sep 2021 08:17:19 GMT Message-Id: <202109190817.18J8HJCK028956@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: 8e698cd2ab2f - stable/13 - Add -Wno-error=unused-but-set-variable when building 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: 8e698cd2ab2f40d172d5c12c516b99f9553853d5 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: Sun, 19 Sep 2021 08:17:19 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=8e698cd2ab2f40d172d5c12c516b99f9553853d5 commit 8e698cd2ab2f40d172d5c12c516b99f9553853d5 Author: Dimitry Andric AuthorDate: 2021-08-26 15:36:03 +0000 Commit: Dimitry Andric CommitDate: 2021-09-19 08:13:48 +0000 Add -Wno-error=unused-but-set-variable when building with Clang 13+ This warning triggers many times while building world. Downgrade it to a warning until all occurrences have been fixed. Once the Clang warnings have been fixed we should be able to turn it on for GCC as well. See also f4fed768bba45a406f73ed1491d7e52fd1a8711d which did the same for the kernel builds. Reviewed by: arichardson, imp Differential Revision: https://reviews.freebsd.org/D31927 (cherry picked from commit 45feade38ec3e8e30086dedc6ee81cbf816293e3) --- share/mk/bsd.sys.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index e53994484c93..745382a32bc9 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -80,6 +80,9 @@ CWARNFLAGS+= -Wno-pointer-sign .if ${WARNS} <= 6 CWARNFLAGS.clang+= -Wno-empty-body -Wno-string-plus-int CWARNFLAGS.clang+= -Wno-unused-const-variable +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000 +CWARNFLAGS.clang+= -Wno-error=unused-but-set-variable +.endif .endif # WARNS <= 6 .if ${WARNS} <= 3 CWARNFLAGS.clang+= -Wno-tautological-compare -Wno-unused-value\