audk/MdePkg/Include/Library
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
..
ArmTrngLib.h MdePkg/ArmTrngLib: Definition for Arm TRNG library class interface 2022-11-06 16:32:28 +00:00
BaseLib.h MdePkg/BaseLib: Add a new VMGEXIT instruction invocation for SVSM 2024-04-17 18:30:03 +00:00
BaseMemoryLib.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseRiscVSbiLib.h MdePkg: BaseRiscVSbiLib: make more useful to consumers 2023-05-17 23:47:20 +00:00
CacheMaintenanceLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
CcProbeLib.h MdePkg: Add CcProbeLibNull 2022-04-19 01:26:08 +00:00
CpuLib.h MdePkg: Add LoongArch64 FPU function set into BaseCpuLib 2024-02-06 23:51:47 +08:00
DebugLib.h MdePkg: DebugLib: Compilation fix for clang-13 2024-07-22 12:37:00 +03:00
DebugPrintErrorLevelLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DevicePathLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeCoreEntryPoint.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeServicesLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeServicesTableLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ExtractGuidedSectionLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FdtLib.h UefiPayloadPkg: Add FIT support 2023-09-26 07:26:21 +00:00
FileHandleLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HobLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HstiLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
IoLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
JedecJep106Lib.h MdePkg: Add new JedecJep106Lib to fetch JEDEC JEP106 manufacturer 2023-04-12 14:29:54 +00:00
MemoryAllocationLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MipiSysTLib.h MdePkg: Add MipiSysTLib library 2023-05-11 07:26:38 +00:00
MmServicesTableLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
MmUnblockMemoryLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
OrderedCollectionLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PcdLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciCf8Lib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciExpressLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciSegmentInfoLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PciSegmentLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeCoffExtraActionLib.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeCoffGetEntryPointLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeCoffLib.h MdePkg/PeCoffLib: Capture DLL characteristics fields in image context 2023-04-07 13:18:38 +00:00
PeiCoreEntryPoint.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiServicesLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiServicesTablePointerLib.h MdePkg: Add a new library named PeiServicesTablePointerLibKs0 2024-02-06 23:51:47 +08:00
PeimEntryPoint.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PerformanceLib.h MdePkg: DebugLib: Compilation fix for clang-13 2024-07-22 12:37:00 +03:00
PostCodeLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PrintLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
RegisterFilterLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ReportStatusCodeLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ResourcePublicationLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
RngLib.h MdePkg/Rng: Add GetRngGuid() to RngLib 2023-09-08 09:48:55 +00:00
S3BootScriptLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
S3IoLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
S3PciLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
S3PciSegmentLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
S3SmbusLib.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
S3StallLib.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SafeIntLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SerialPortLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmbusLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmiHandlerProfileLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmCpuRendezvousLib.h MdePkg: add SmmCpuRendezvousLib.h and SmmCpuRendezvousLibNull implement. 2022-05-09 02:04:11 +00:00
SmmIoLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmMemLib.h MdePkg/Library/Smm: Fix various typos 2020-02-10 22:30:07 +00:00
SmmPeriodicSmiLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SmmServicesTableLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
StandaloneMmDriverEntryPoint.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SynchronizationLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
TdxLib.h MdePkg: Add TdxLib to wrap Tdx operations 2022-04-02 08:15:12 +00:00
TimerLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
TraceHubDebugSysTLib.h MdePkg: Add NULL library of TraceHubDebugSysTLib 2023-05-11 07:26:38 +00:00
UefiApplicationEntryPoint.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiBootServicesTableLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiDecompressLib.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiDriverEntryPoint.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiRuntimeLib.h MdePkg: Add EFI_UNSUPPORTED return for some Runtime Service functions 2024-02-09 22:16:32 +00:00
UefiRuntimeServicesTableLib.h MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiScsiLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UefiUsbLib.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
UnitTestLib.h MdePkg: Update code to be more C11 compliant by using __func__ 2023-03-17 17:55:48 +00:00