audk/MdePkg/Include
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
..
AArch64 MdePkg/ProcessorBind AARCH64: Add asm macro to emit GNU BTI note 2023-03-30 11:05:22 +00:00
Arm MdePkg: Remove RVCT support 2022-05-13 14:58:54 +00:00
Ebc MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Guid MdePkg: Update MemoryAttributesTable to v2.10 2023-03-30 11:05:22 +00:00
Ia32 MdePkg: Remove VS2008-VS2013 remnants 2023-05-05 11:41:35 +00:00
IndustryStandard MdePkg/Tdx.h: Add TDVMCALL_STATUS_RETRY 2023-11-09 17:15:39 +00:00
Library MdePkg: DebugLib: Compilation fix for clang-13 2023-12-20 13:36:38 +03:00
LoongArch64 MdePkg: Fix UINT64 and INT64 word length for LoongArch64 2023-02-01 02:12:41 +00:00
Pi MdePkg: PiStatusCode: Add TPM subclass definition to MdePkg 2023-06-23 16:28:24 +00:00
Ppi MdePkg/Include/Ppi: Remove Itanium leftover data structure 2023-03-26 02:03:50 +00:00
Protocol RedfishPkg/RedfishRestExDxe: return HTTP status code to caller. 2023-09-19 15:41:18 +00:00
Register MdePkg/Register: RISC-V: Add satp mode bits shift definition 2023-07-15 14:10:18 +00:00
RiscV64 MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Uefi MdePkg: Add missing status codes 2023-08-07 22:56:02 +00:00
X64 MdePkg: don't set visibility to hidden 2023-06-01 10:53:35 +00:00
Base.h MdePkg: Add missing status codes 2023-08-07 22:56:02 +00:00
ConfidentialComputingGuestAttr.h MdePkg: Add CC_GUEST_TYPE in ConfidentialComputingGuestAttr.h 2022-04-19 01:26:08 +00:00
PiDxe.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiMm.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiPei.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PiSmm.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Uefi.h MdePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00