[edk2-devel] MdePkg fails to build in RELEASE mode with clang 13 (CLANG38 toolset)

Andrew Fish via groups.io afish=apple.com at groups.io
Thu Feb 3 02:01:47 UTC 2022


Mike,

That sounds like the right fox to me. Disable the warning.
> On Feb 2, 2022, at 1:18 PM, Michael D Kinney <michael.d.kinney at intel.com> wrote:
> 
> 
> 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 at quicinc.com> 
> Sent: Wednesday, February 2, 2022 12:52 PM
> To: Kinney, Michael D <michael.d.kinney at intel.com>; Gao, Liming <gaoliming at byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu at intel.com>; devel at 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
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86353): https://edk2.groups.io/g/devel/message/86353
Mute This Topic: https://groups.io/mt/88869032/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20220202/6e5a50ee/attachment.htm>


More information about the edk2-devel-archive mailing list