Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VExpressPkg/Library: define mAcpiAddrSpaceTypeStr regardless of build #238

Closed
wants to merge 1 commit into from

Conversation

LeviYeoReum
Copy link
Contributor

@LeviYeoReum LeviYeoReum commented Nov 5, 2024

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.

… type

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.

Signed-off-by: Levi Yun <[email protected]>
@LeviYeoReum LeviYeoReum closed this Nov 6, 2024
@LeviYeoReum LeviYeoReum deleted the fix_build_failure branch November 6, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants