From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: Rebecca Cran <quic_rcran@quicinc.com>,
"Gao, Liming" <gaoliming@byosoft.com.cn>,
"Liu, Zhiguang" <zhiguang.liu@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: MdePkg fails to build in RELEASE mode with clang 13 (CLANG38 toolset)
Date: Wed, 2 Feb 2022 21:18:07 +0000 [thread overview]
Message-ID: <SA2PR11MB4938A4005093DE3E14B3BFDAD2279@SA2PR11MB4938.namprd11.prod.outlook.com> (raw)
In-Reply-To: <a95f4d3e-0d16-f61d-28e1-39e39b1fc494@quicinc.com>
[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]
Hi Rebecca,
GCC added -Wno-unused-but-set-variable back in 2016 for RELEASE builds to address this same issue
https://github.com/tianocore/edk2/commit/20d00edf21d2f2144921622891d8b59a1553cd83
Then later added -Wno-unused-const-variable
https://github.com/tianocore/edk2/commit/8b6366f8758426fd6710646574b9a7e583e0fe0d
Mike
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, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>; devel@edk2.groups.io
Subject: MdePkg fails to build in RELEASE mode with clang 13 (CLANG38 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/UefiMemoryAllocationLib/MemoryAllocationLib.c:141:15: error: variable 'Status' set but not used [-Werror,-Wunused-but-set-variable]
EFI_STATUS Status;
^
edk2/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c:347:15: error: variable 'Status' set but not used [-Werror,-Wunused-but-set-variable]
EFI_STATUS Status;
^
edk2/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c:818:15: error: variable 'Status' set but not used [-Werror,-Wunused-but-set-variable]
EFI_STATUS Status;
--
Rebecca Cran
[-- Attachment #2: Type: text/html, Size: 42733 bytes --]
next prev parent reply other threads:[~2022-02-02 21:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 20:51 MdePkg fails to build in RELEASE mode with clang 13 (CLANG38 toolset) Rebecca Cran
2022-02-02 21:18 ` Michael D Kinney [this message]
2022-02-03 2:01 ` [edk2-devel] " Andrew Fish
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SA2PR11MB4938A4005093DE3E14B3BFDAD2279@SA2PR11MB4938.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox