From nobody Tue Jun 20 19:39:16 2023 X-Original-To: dev-commits-src-all@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 4Qlxlm4k4Lz4gFl4; Tue, 20 Jun 2023 19:39:16 +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 4Qlxlm44dMz44WP; Tue, 20 Jun 2023 19:39:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687289956; 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=OwZqFcX9LtBJvY4Hiw+Sxkh6n9UF8Pgy8nKSaNyisnA=; b=RT9Cqew+c9ZWRhhNOy9lCGc3qtM3bvrOthiH3pBSq8YFYmOh13KQiRtZk6bYeTwk/5wbKc poST33NU8LJHQAK9EI5OgBLjCCJIkM7QPv2mGWN0LUf9sTjZuTKvhBW8KkcyI8SZHctkMS UmQVARQjmOS2NW4y7XK2DKXbkrfw1mhrUdC5wNUhac4Gdqg9yk3B5ayj3Se5xCpOOUvelT BFMKrjaiiPNFKuZCB7heH0Kkg7G8BCXRN5JSgx7ug6tjwwrzEsiXwvUwymmI8DYHSABUsm OckBE5dcQFQGfTBeggUmOPv2ybkc9u10DzKCPZ1KtYpUpnqsu5ee8dui7B8p8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687289956; 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=OwZqFcX9LtBJvY4Hiw+Sxkh6n9UF8Pgy8nKSaNyisnA=; b=mmhL2eUeE+O+lgkBcYFvHb0wOVHDVwhihNC3ebxjCY305y6sXsJ7lcWLnjU8/TfxOV6yKz bm0UmUbP30KV2qbeQQvSVs+dxwpM60kC/Fy4RgcxuInw1GyE6odBCnaP21jIxn0Fk/IFmy NOIr+qsgVPko4g7wz/wix2DPCbuEFjKKt/w2nvHCj6/Lxts2r5dH/48/AhggGXuk1gUSTl FWAX7tP/ZNEUqYScU7idBcgtky1thc0YE0Q9n5ovUdKJZDajTqNh4k90MjBjcjnHkyFvB+ 4y35prgP7dKXd7S/uP5GkEahSgWeNOGSo15qwEy25N45TESXbXeSU0UN0Do5nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687289956; a=rsa-sha256; cv=none; b=BFwB1yc6FxPggniQfk0IysTGDBUq72LyKfr0SuDpnF0uLmQhaVMPk7sUn4SNOw2Wgfe6mq t/gkfAmY/3wwG4WhMujMMNeWLYPFTu5YgNFc/gBqTGSjs9DuhUtXHaqK/htq8tsYrRdKVu u86MKtQQdbm3iVFPU9vP22rYrVIBfPdVve/7t+a6DyYEWFN9+Fd5UtAOtEUB9iXitwjpLb YAERL6gZoWqjqVAUePmzIsSszAy0xfKg7flvUI168YRnemtH6/raFane65Q0z67m4cX4N+ HT/TwTRSoYeyrcakvNwbNigspqFYOd8P70iIhgooaQykz7lX5Jx74nty1q/09Q== 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 4Qlxlm33pYz1BdG; Tue, 20 Jun 2023 19:39:16 +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 35KJdGtK058429; Tue, 20 Jun 2023 19:39:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35KJdGP3058428; Tue, 20 Jun 2023 19:39:16 GMT (envelope-from git) Date: Tue, 20 Jun 2023 19:39:16 GMT Message-Id: <202306201939.35KJdGP3058428@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: ad79b018dc00 - main - bsd.sys.mk: Add NO_WUNUSED_BUT_SET_VARIABLE helper variable. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: ad79b018dc00c2b64e65ebb5c8a14fafa0e99a3e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ad79b018dc00c2b64e65ebb5c8a14fafa0e99a3e commit ad79b018dc00c2b64e65ebb5c8a14fafa0e99a3e Author: John Baldwin AuthorDate: 2023-06-20 19:36:15 +0000 Commit: John Baldwin CommitDate: 2023-06-20 19:36:15 +0000 bsd.sys.mk: Add NO_WUNUSED_BUT_SET_VARIABLE helper variable. This is already present in sys/conf/kern.mk and can be used to selectively disable -Wunused-but-set-variable. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40663 --- share/mk/bsd.sys.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index b4a417236c65..f3eb1fe99b2f 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -116,6 +116,9 @@ CWARNFLAGS.clang+= -Wno-array-bounds ${COMPILER_TYPE} == "gcc") CWARNFLAGS+= -Wno-misleading-indentation .endif # NO_WMISLEADING_INDENTATION +.if ${COMPILER_VERSION} >= 130000 +NO_WUNUSED_BUT_SET_VARIABLE= -Wno-unused-but-set-variable +.endif .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 140000 NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical .endif @@ -124,6 +127,9 @@ NO_WARRAY_PARAMETER= -Wno-array-parameter NO_WSTRICT_PROTOTYPES= -Wno-strict-prototypes NO_WDEPRECATED_NON_PROTOTYPE=-Wno-deprecated-non-prototype .endif +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50200 +NO_WUNUSED_BUT_SET_VARIABLE=-Wno-unused-but-set-variable +.endif .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 100100 NO_WZERO_LENGTH_BOUNDS= -Wno-zero-length-bounds .endif