audk/ArmPkg
Mikhail Krichanov 80c73c3923 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>
2024-07-22 12:37:00 +03:00
..
Drivers ArmPkg: Disable watchdog interaction after exiting boot services 2024-01-30 15:01:17 +00:00
Filesystem/SemihostFs ArmPkg/SemihostFs: replace SetMem with ZeroMem 2023-03-09 09:45:39 +00:00
Include ArmPkg: Remove ArmCortexA9.h 2024-04-05 05:03:15 +00:00
Library MdePkg: DebugLib: Compilation fix for clang-13 2024-07-22 12:37:00 +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: Allow SMC/HVC monitor conduit to be specified at runtime 2024-05-24 15:48:52 +00:00
ArmPkg.dsc Revert "ArmPkg: add ArmCpuInfo EFI application" 2023-09-05 17:00:40 +00:00