audk/ArmPkg/Library
Mike Beaton ae83c6b7fd MdePkg: Fix null macros for XCODE5 and CLANG
When building OvmfPkg in RELEASE mode in the XCODE5 toolchain, the
ASSERT_EFI_ERROR change prevents this error:

.../MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c:141:15:
error: variable 'Status' set but not used [-Werror,-Wunused-but-set-variable]
  EFI_STATUS  Status;
              ^

which is currently stopping the build.

When building in RELEASE mode in the CLANGPDB toolchain,the DEBUG macro
change prevents this error:

.../edk2/OvmfPkg/VirtioSerialDxe/VirtioSerial.c:28:22: error:
variable 'EventNames' is not needed and will not be
emitted [-Werror,-Wunneeded-internal-declaration]
STATIC CONST CHAR8  *EventNames[] = {
                     ^

which is currently stopping the build.

CLANGDWARF produces the same error as CLANGPDB above, if
-Wno-unneeded-internal-declaration is removed from its build flags.
With the null DEBUG macro change, this warning suppression
can be removed from CLANGDWARF, which is considered a benefit
as it has the potential to catch real coding errors. This is
done in a subsequent commit.

This commit has the desirable side effect that we no longer require
(and cannot use) explicit `#ifndef MDEPKG_NDEBUG` around items only
used in DEBUG macros. This requires the ArmPkg change made here to
be in the same commit as the MdePkg changes.

Note: In common with existing macros in EDK II, including the pre-existing
and unchanged DEBUG/NOOPT versions of the macros which are modified here,
we use the standard approach of adding `do { ... } while (FALSE)` wrapping
to ensure that the macros behave correctly with surrounding code
(e.g. require a following ';' and do not combine in unexpected ways with
nearby conditionals).

Continuous-integration-options: PatchCheck.ignore-multi-package
Co-authored-by: Mikhail Krichanov <krichanov@ispras.ru>
Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2024-10-18 16:22:07 +00:00
..
ArmArchTimerLib ArmPkg: Fix timer wrap-around 2024-09-01 09:55:01 +00:00
ArmCacheMaintenanceLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmDisassemblerLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmExceptionLib MdePkg: Move AsmMacroIoLib*.h from ArmPkg 2024-09-12 19:36:59 +00:00
ArmGenericTimerPhyCounterLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmGenericTimerVirtCounterLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmGicArchLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmGicArchSecLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmHvcLib MdePkg: Move AsmMacroIoLib*.h from ArmPkg 2024-09-12 19:36:59 +00:00
ArmHvcLibNull ArmPkg/ArmHvcLibNull: Add NULL instance of ArmHvcLib 2022-11-06 16:32:28 +00:00
ArmLib ArmPkg/ArmLib: Drop set/way Dcache operations 2024-09-13 00:23:13 +00:00
ArmMmuLib MdePkg: Move AsmMacroIoLib*.h from ArmPkg 2024-09-12 19:36:59 +00:00
ArmMonitorLib MdePkg: Move AsmMacroIoLib*.h from ArmPkg 2024-09-12 19:36:59 +00:00
ArmMtlNullLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmPsciResetSystemLib ArmPkg: Introduce ResetSystemLib implementation based on ArmMonitorLib 2024-07-24 19:58:01 +00:00
ArmSmcLib MdePkg: Move AsmMacroIoLib*.h from ArmPkg 2024-09-12 19:36:59 +00:00
ArmSmcLibNull ArmPkg: Add SMC helper functions 2021-12-14 11:30:26 +00:00
ArmSoftFloatLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ArmSvcLib MdePkg: Move AsmMacroIoLib*.h from ArmPkg 2024-09-12 19:36:59 +00:00
ArmTrngLib ArmPkg/ArmTrngLib: Remove ASSERTs in ArmTrngLibConstructor() 2022-11-26 14:42:41 +00:00
DebugAgentSymbolsBaseLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DebugPeCoffExtraActionLib ArmPkg: Disable AuditOnly mode for uncrustify 2024-07-24 10:21:47 +00:00
DefaultExceptionHandlerLib MdePkg: Fix null macros for XCODE5 and CLANG 2024-10-18 16:22:07 +00:00
LinuxBootBootManagerLib ArmPkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00
OpteeLib ArmPkg/OpteeLib: Map shared communication buffer non-executable 2023-06-27 16:40:07 +00:00
PeiServicesTablePointerLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PlatformBootManagerLib ArmPkg: Configure PcdEmuVariableNvModeEnable as a dynamic PCD 2023-05-29 15:14:00 +00:00
SemiHostingDebugLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SemiHostingSerialPortLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SemihostLib MdePkg: Move AsmMacroIoLib*.h from ArmPkg 2024-09-12 19:36:59 +00:00
StandaloneMmMmuLib ArmPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00