From: Pankaj Bansal <pankaj.ban...@nxp.com> when MDEPKG_NDEBUG flag is enabled, RELEASE build fails with this error:
error: mPciHostBridgeLibAcpiAddressSpaceTypeStr defined but not used [-Werror=unused-variable] Fix this error by protecting mPciHostBridgeLibAcpiAddressSpaceTypeStr with MDEPKG_NDEBUG macro. Suggested-by: Leif Lindholm <l...@nuviainc.com> Signed-off-by: Pankaj Bansal <pankaj.ban...@nxp.com> --- Notes: V3: - New commit Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c b/Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c index 549f4fa133fb..e5309a4f4248 100644 --- a/Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ b/Silicon/NXP/Library/PciHostBridgeLib/PciHostBridgeLib.c @@ -167,11 +167,13 @@ STATIC CONST EFI_PCI_ROOT_BRIDGE_DEVICE_PATH mEfiPciRootBridgeDevicePath[] = { } }; +#ifndef MDEPKG_NDEBUG STATIC GLOBAL_REMOVE_IF_UNREFERENCED CHAR16 *mPciHostBridgeLibAcpiAddressSpaceTypeStr[] = { L"Mem", L"I/O", L"Bus" }; +#endif #define PCI_ALLOCATION_ATTRIBUTES EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM | \ EFI_PCI_HOST_BRIDGE_MEM64_DECODE -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#60431): https://edk2.groups.io/g/devel/message/60431 Mute This Topic: https://groups.io/mt/74538274/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-