From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ma1-aaemail-dr-lapp01.apple.com (ma1-aaemail-dr-lapp01.apple.com [17.171.2.60]) by mx.groups.io with SMTP id smtpd.web11.3600.1643853715405144392 for ; Wed, 02 Feb 2022 18:01:55 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=sKAwkV09; spf=pass (domain: apple.com, ip: 17.171.2.60, mailfrom: afish@apple.com) Received: from pps.filterd (ma1-aaemail-dr-lapp01.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp01.apple.com (8.16.0.42/8.16.0.42) with SMTP id 2131xfXi007127; Wed, 2 Feb 2022 18:01:50 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=content-type : content-transfer-encoding : from : mime-version : subject : date : message-id : references : cc : in-reply-to : to; s=20180706; bh=urZ2/BOAl3lPrC00xeFrkcQQjQR9uEKxVolu61h4OLA=; b=sKAwkV09Of/N+87SndDoOW/wK+91O74UQj2UVHRGzDuyt5MQroM0/ABiesZ70hITAMOC x0j/RasAjYsp2RcMg3RlrCeKwCaTRNB99A492NE+iKBEPnMory4sUICE0vTPhg7zZUq7 n8+i71SRz/sDgx1P2KX3i9v+oKdIVMFgYNmoZgUCft67BjpVmZAH9VajB1wEXa9xBexJ WzDTCPqyrGJ6ajiCJ80p0eX3wtSsk5If/6fZ+0n+H3RnJJPG6Ik/MOJTpqzBdQnNQo3Z kgSxGRqlWY4xxOHRcb/CMiRSv9bsLw+ZGQaePIHaVQJ4Uhn3SdHbUr7m0kPvyg/57wCS wg== Received: from rn-mailsvcp-mta-lapp01.rno.apple.com (rn-mailsvcp-mta-lapp01.rno.apple.com [10.225.203.149]) by ma1-aaemail-dr-lapp01.apple.com with ESMTP id 3dw548hkvq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 02 Feb 2022 18:01:49 -0800 Received: from rn-mailsvcp-mmp-lapp04.rno.apple.com (rn-mailsvcp-mmp-lapp04.rno.apple.com [17.179.253.17]) by rn-mailsvcp-mta-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) with ESMTPS id <0R6P00JOXHN0XY90@rn-mailsvcp-mta-lapp01.rno.apple.com>; Wed, 02 Feb 2022 18:01:48 -0800 (PST) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp04.rno.apple.com by rn-mailsvcp-mmp-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) id <0R6P00500HHNNX00@rn-mailsvcp-mmp-lapp04.rno.apple.com>; Wed, 02 Feb 2022 18:01:48 -0800 (PST) X-Va-A: X-Va-T-CD: aac41910b3a7b451bf4713d98d358fb7 X-Va-E-CD: f4fdf98ba6c08105fdbbc222859652ef X-Va-R-CD: 85a1405420a949d6c6953a349841cad5 X-Va-CD: 0 X-Va-ID: 466935f2-6fca-4c0b-85dc-ffdfd05ffc32 X-V-A: X-V-T-CD: aac41910b3a7b451bf4713d98d358fb7 X-V-E-CD: f4fdf98ba6c08105fdbbc222859652ef X-V-R-CD: 85a1405420a949d6c6953a349841cad5 X-V-CD: 0 X-V-ID: 6ab13023-de74-4b8d-b48c-c4bf78d651a7 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.816 definitions=2022-02-02_11:2022-02-01,2022-02-02 signatures=0 Received: from smtpclient.apple (unknown [17.11.123.64]) by rn-mailsvcp-mmp-lapp04.rno.apple.com (Oracle Communications Messaging Server 8.1.0.12.20210903 64bit (built Sep 3 2021)) with ESMTPSA id <0R6P00OIBHMZ9U00@rn-mailsvcp-mmp-lapp04.rno.apple.com>; Wed, 02 Feb 2022 18:01:48 -0800 (PST) From: "Andrew Fish" MIME-version: 1.0 (1.0) Subject: Re: [edk2-devel] MdePkg fails to build in RELEASE mode with clang 13 (CLANG38 toolset) Date: Wed, 02 Feb 2022 18:01:47 -0800 Message-id: References: Cc: Rebecca Cran , "Gao, Liming" , "Liu, Zhiguang" In-reply-to: To: devel@edk2.groups.io, michael.d.kinney@intel.com X-Mailer: iPhone Mail (19D50) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.425,18.0.816 definitions=2022-02-02_11:2022-02-01,2022-02-02 signatures=0 Content-type: multipart/alternative; boundary=Apple-Mail-4AE1CAF5-C26A-4A3F-A556-22F1225FE6C7 Content-transfer-encoding: 7bit --Apple-Mail-4AE1CAF5-C26A-4A3F-A556-22F1225FE6C7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mike, That sounds like the right fox to me. Disable the warning. > On Feb 2, 2022, at 1:18 PM, Michael D Kinney = wrote: >=20 > =EF=BB=BF > Hi Rebecca, > =20 > GCC added -Wno-unused-but-set-variable back in 2016 for RELEASE builds to= address this same issue > =20 > https://github.com/tianocore/edk2/commit/20d00edf21d2f2144921622891d8b59a= 1553cd83 > =20 > Then later added -Wno-unused-const-variable > =20 > https://github.com/tianocore/edk2/commit/8b6366f8758426fd6710646574b9a7e5= 83e0fe0d > =20 > Mike > =20 > From: Rebecca Cran =20 > Sent: Wednesday, February 2, 2022 12:52 PM > To: Kinney, Michael D ; Gao, Liming ; Liu, Zhiguang ; devel@edk2.group= s.io > Subject: MdePkg fails to build in RELEASE mode with clang 13 (CLANG38 too= lset) > =20 > With the CLANG38 toolset (clang version 13.0.0) MdePkg fails to build in = RELEASE mode because Status is only used by an assert. > =20 > edk2/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c:141:15:= error: variable 'Status' set but not used [-Werror,-Wunused-but-set-variab= le]=20 > EFI_STATUS Status;=20 > ^=20 > edk2/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c:347:15:= error: variable 'Status' set but not used [-Werror,-Wunused-but-set-variab= le]=20 > EFI_STATUS Status;=20 > ^=20 > edk2/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c:818:15:= error: variable 'Status' set but not used [-Werror,-Wunused-but-set-variab= le]=20 > EFI_STATUS Status; >=20 > --=20 > Rebecca Cran >=20 >=20 --Apple-Mail-4AE1CAF5-C26A-4A3F-A556-22F1225FE6C7 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mike,

That sounds li= ke the right fox to me. Disable the warning.

=

On Feb 2, 2022, at 1:18 PM, = Michael D Kinney <michael.d.kinney@intel.com> wrote:

=EF=BB=BF

Hi= Rebecca,

 

GC= C added -Wno-unused-but-set-variable back in = 2016 for RELEASE builds to address this same issue

 

https://github.com/tianocore/ed= k2/commit/20d00edf21d2f2144921622891d8b59a1553cd83

 

Th= en later added -Wno-unused-const-variable

 

https://github.com/tianocore/ed= k2/commit/8b6366f8758426fd6710646574b9a7e583e0fe0d

 

Mi= ke

 

From: Rebecca Cran <quic_rcran@quicinc.com>
Sent: Wednesday, February 2, 2022 12:52 PM
To: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Limin= g <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.co= m>; devel@edk2.groups.io
Subject: MdePkg fails to build in RELEASE mode with clang 13 (CLANG3= 8 toolset)

 

With the CLANG38 toolset (clang version 13.0.0) MdePkg fails to build =
in RELEASE mode because Status is only used by an assert.
 

edk2/MdePkg/Library/UefiMemoryAlloc= ationLib/MemoryAllocationLib.c:141:15: error: variable 'Status' set but not= used [-Werror,-Wunused-but-set-variable]
 EFI_STATUS  Status;
            &nb= sp;^
edk2/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c:347:15: e= rror: variable 'Status' set but not used [-Werror,-Wunused-but-set-variable= ]
 EFI_STATUS  Status;
            &nb= sp;^
edk2/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c:818:15: e= rror: variable 'Status' set but not used [-Werror,-Wunused-but-set-variable= ]
 EFI_STATUS  Status;

--
Rebecca Cran

=20
--Apple-Mail-4AE1CAF5-C26A-4A3F-A556-22F1225FE6C7--