From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 48129D80141 for ; Sun, 10 Dec 2023 10:19:11 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=vee4K2s/aYmjvMA7jUL3qw3KfAVcZkCIIuZEaeRdrnA=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1702203549; v=1; b=Al5tm64wUZR3tZ27DtgOzo/nrUUNxwtabYMW9Vj6GCz7yqrL2/26OECqa8qO3hDL2KsNipd6 8mCzqTy8pbqtZgzmapIbNqh1QANr7Xmu4vOXV4T6yla9np9hG8gYV86pKKG6M0OJypUlBcgsRON iS1viJvFcf1GNQaa2AENUk1k= X-Received: by 127.0.0.2 with SMTP id WlUFYY7687511xDVxPU2sKc0; Sun, 10 Dec 2023 02:19:09 -0800 X-Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by mx.groups.io with SMTP id smtpd.web11.52839.1702203548916597114 for ; Sun, 10 Dec 2023 02:19:09 -0800 X-Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2c9e9c2989dso45604781fa.0 for ; Sun, 10 Dec 2023 02:19:08 -0800 (PST) X-Gm-Message-State: 8BEwZWhiYvM4LhZfdA7kHezkx7686176AA= X-Google-Smtp-Source: AGHT+IEFzICJ19azQRGuifO0vEClroEP/14lhq7aGbj8HWxncRK3UEp0nlerJV21xq0xbwGMAGJuMA== X-Received: by 2002:a2e:9856:0:b0:2ca:bd5:9e7c with SMTP id e22-20020a2e9856000000b002ca0bd59e7cmr929875ljj.70.1702203546267; Sun, 10 Dec 2023 02:19:06 -0800 (PST) X-Received: from mikes-OptiPlex-3070.lan ([209.240.3.199]) by smtp.gmail.com with ESMTPSA id o12-20020a5d474c000000b003333dd777a4sm6104718wrs.46.2023.12.10.02.19.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 02:19:05 -0800 (PST) From: "Mike Beaton" To: devel@edk2.groups.io Cc: ardb@google.com, Mike Beaton Subject: [edk2-devel] [PATCH] BaseTools/tools_def: Disable unneeded-internal-declaration warning in CLANGPDB Date: Sun, 10 Dec 2023 10:18:59 +0000 Message-Id: <20231210101859.19198-1-mjsbeaton@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mjsbeaton@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=Al5tm64w; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) From: Mike Beaton This warning was already disabled in CLANGDWARF by commit d3225577123767fd09c91201d27e9c91663ae132. gcc can distinguish between optimised-away variable usage (as can occur in valid debug code) and genuinely unused variables, and only complains about the latter. clang cannot, and therefore this warning ends up complaining about valid debug code under clang. Since EDK-II code is in general going to be compiled by gcc as well as clang then disabling this warning in clang does not amount to entirely removing potentially valid warnings about genuinely unused variables. Signed-off-by: Mike Beaton --- BaseTools/Conf/tools_def.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.t= emplate index c34ecfd557..48cf45245f 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -1754,7 +1754,7 @@ DEFINE CLANGPDB_X64_PREFIX =3D ENV(CLANG_BI= N) DEFINE CLANGPDB_IA32_TARGET =3D -target i686-unknown-windows-gnu= =0D DEFINE CLANGPDB_X64_TARGET =3D -target x86_64-unknown-windows-gn= u=0D =0D -DEFINE CLANGPDB_WARNING_OVERRIDES =3D -Wno-parentheses-equality -Wno-ta= utological-compare -Wno-tautological-constant-out-of-range-compare -Wno-emp= ty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option= -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-acc= ess -Wno-microsoft-enum-forward-reference=0D +DEFINE CLANGPDB_WARNING_OVERRIDES =3D -Wno-parentheses-equality -Wno-ta= utological-compare -Wno-tautological-constant-out-of-range-compare -Wno-emp= ty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option= -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-acc= ess -Wno-unneeded-internal-declaration -Wno-microsoft-enum-forward-referenc= e=0D DEFINE CLANGPDB_ALL_CC_FLAGS =3D DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG= PDB_WARNING_OVERRIDES) -fno-stack-protector -funsigned-char -ftrap-function= =3Dundefined_behavior_has_been_optimized_away_by_clang -Wno-address -Wno-sh= ift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclara= tion -Wno-null-dereference -mno-implicit-float -mms-bitfields -mno-stack-ar= g-probe -nostdlib -nostdlibinc -fseh-exceptions=0D =0D ###########################=0D --=20 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112259): https://edk2.groups.io/g/devel/message/112259 Mute This Topic: https://groups.io/mt/103087794/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-