VExpressPkg/Library: define mAcpiAddrSpaceTypeStr regardless of build #238
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since mAcpiAddrSpaceTypeStr is defined only if build type is DEBUG,
it makes build failure on RELEASE build while expanding macro:
/home/yeoyun01/work/uefi/edk2-platforms/Platform/ARM/VExpressPkg/Library/ArmVExpressPciHostBridgeLib/ArmVExpressPciHostBridgeLib.c:182:49: error: 'mAcpiAddrSpaceTypeStr' undeclared (first use in this function)
182 | ASSERT (Descriptor->ResType < ARRAY_SIZE (mAcpiAddrSpaceTypeStr));
| ^~~~~~~~~~~~~~~~~~~~~
/home/yeoyun01/work/uefi/edk2/MdePkg/Include/Library/DebugLib.h:416:17: note: in definition of macro 'ASSERT'
416 | (VOID) (Expression);
| ^~~~~~~~~~
/home/yeoyun01/work/uefi/edk2-platforms/Platform/ARM/VExpressPkg/Library/ArmVExpressPciHostBridgeLib/ArmVExpressPciHostBridgeLib.c:182:37: note: in expansion of macro 'ARRAY_SIZE'
182 | ASSERT (Descriptor->ResType < ARRAY_SIZE (mAcpiAddrSpaceTypeStr));
| ^~~~~~~~~~
/home/yeoyun01/work/uefi/edk2-platforms/Platform/ARM/VExpressPkg/Library/ArmVExpressPciHostBridgeLib/ArmVExpressPciHostBridgeLib.c:182:49: note: each undeclared identifier is reported only once for each function it appears in
182 | ASSERT (Descriptor->ResType < ARRAY_SIZE (mAcpiAddrSpaceTypeStr));
| ^~~~~~~~~~~~~~~~~~~~~
/home/yeoyun01/work/uefi/edk2/MdePkg/Include/Library/DebugLib.h:416:17: note: in definition of macro 'ASSERT'
416 | (VOID) (Expression);
| ^~~~~~~~~~
/home/yeoyun01/work/uefi/edk2-platforms/Platform/ARM/VExpressPkg/Library/ArmVExpressPciHostBridgeLib/ArmVExpressPciHostBridgeLib.c:182:37: note: in expansion of macro 'ARRAY_SIZE'
182 | ASSERT (Descriptor->ResType < ARRAY_SIZE (mAcpiAddrSpaceTypeStr));
| ^~~~~~~~~~
Building ... /home/yeoyun01/work/uefi/edk2/MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf [AARCH64]
Remove MDEPKG_NDEBUG conditional define for mAcpiAddrSpaceTypeStr.