public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Pankaj Bansal" <pankaj.bansal@nxp.com>
To: Leif Lindholm <leif@nuviainc.com>,
	Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	devel@edk2.groups.io, Varun Sethi <V.Sethi@nxp.com>,
	Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
	Jon Nettleton <jon@solid-run.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH edk2-platforms v4 03/10] Silicon/NXP/PciHostBridgeLib: Fix compilation with MDEPKG_NDEBUG flag
Date: Mon,  1 Jun 2020 19:04:32 +0530	[thread overview]
Message-ID: <20200601133439.5711-4-pankaj.bansal@oss.nxp.com> (raw)
In-Reply-To: <20200601133439.5711-1-pankaj.bansal@oss.nxp.com>

From: Pankaj Bansal <pankaj.bansal@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 <leif@nuviainc.com>
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
---

Notes:
    V4:
    - No change
    
    V3:
    - New commit
    
    V2:
    - No change

 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


  parent reply	other threads:[~2020-06-01 13:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01 13:34 [PATCH edk2-platforms v4 00/10] Add LX2160ARDB Platform Pankaj Bansal
2020-06-01 13:34 ` [PATCH edk2-platforms v4 01/10] Silicon/NXP: Use Metronome implementation from MdeModulePkg Pankaj Bansal
2020-06-01 13:34 ` [PATCH edk2-platforms v4 02/10] Platform/NXP: Use Monotonic counter " Pankaj Bansal
2020-06-01 13:34 ` Pankaj Bansal [this message]
2020-06-01 13:34 ` [PATCH edk2-platforms v4 04/10] Silicon/NXP: Use edk2 recommended compilation flags Pankaj Bansal
2020-06-01 13:34 ` [PATCH edk2-platforms v4 05/10] Platform/NXP/LX2160ARDB: Add ArmPlatformLib Pankaj Bansal
2020-06-01 13:34 ` [PATCH edk2-platforms v4 06/10] Silicon/NXP: Implement PL011UartClockLib for NXP platforms Pankaj Bansal
2020-06-01 13:34 ` [PATCH edk2-platforms v4 07/10] Silicon/NXP: Add Chassis3V2 Package Pankaj Bansal
2020-06-01 13:34 ` [PATCH edk2-platforms v4 08/10] Silicon/NXP: Add LX2160A Soc package Pankaj Bansal
2020-06-01 13:34 ` [PATCH edk2-platforms v4 09/10] Platform/NXP: Add LX2160ARDB Platform Pankaj Bansal
2020-06-01 18:00   ` Leif Lindholm
2020-06-01 13:34 ` [PATCH edk2-platforms v4 10/10] Platform/NXP/LX2160aRdbPkg: Add VarStore Pankaj Bansal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200601133439.5711-4-pankaj.bansal@oss.nxp.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox