audk/ArmPkg
Mikhail Krichanov 82e796ffa4 MdePkg: DebugLib: Compilation fix for clang-13
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3704

build -a X64 -t CLANG38 -b RELEASE -p OvmfPkg/OvmfPkgX64.dsc
results in
UDK/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c:1284:31:
error: variable 'Status' set but not used
[-Werror,-Wunused-but-set-variable]

Signed-off-by: Mikhail Krichanov <krichanov@ispras.ru>

MdePkg/DebugLib(PerformanceLib): Fix "unused-but-set-variable" warning

The current definitions of DEBUG_CODE_BEGIN() and DEBUG_CODE_END() use 
the local
variable __DebugCodeLocal as an attempt to track parity. If 
DEBUG_CODE_END() is
used without a preceding DEBUG_CODE_BEGIN(), __DebugCodeLocal will not 
have been
declared and a compilation error will be issued. The mutations of the 
variable
are not used to track nesting or such. As the value of this variable is 
never
actually used, recent Clang versions issue a "unused-but-set-variable" 
warning
for it.

To solve this, re-define __DebugCodeLocal as a BOOLEAN that is always 
FALSE and
use it in a do-while loop condition as done explicitly in many places. 
Like the
previous solution, DEBUG_CODE_END() cannot be used without 
DEBUG_CODE_BEGIN(),
as __DebugCodeLocal will be not have been defined.

Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2023-12-20 13:36:38 +03:00
..
Drivers ArmPkg/ArmPsciMpServices: Add EFI_NOT_READY return 2023-10-18 09:00:09 +00:00
Filesystem/SemihostFs ArmPkg/SemihostFs: replace SetMem with ZeroMem 2023-03-09 09:45:39 +00:00
Include ArmPkg/ArmLib: Add ArmHasEte () helper function 2023-10-30 12:16:56 +00:00
Library MdePkg: DebugLib: Compilation fix for clang-13 2023-12-20 13:36:38 +03:00
Universal/Smbios ArmPkg/SmbiosMiscDxe: use UINT64 for BiosPhysicalSize 2023-08-30 21:10:54 +00:00
ArmPkg.ci.yaml ArmPkg: Enable AuditMode for Uncrustify CI checks 2023-06-02 10:02:03 +00:00
ArmPkg.dec ArmPkg: add EL2 virtual timer interrupt Pcd 2023-09-19 20:27:55 +00:00
ArmPkg.dsc Revert "ArmPkg: add ArmCpuInfo EFI application" 2023-09-05 17:00:40 +00:00