From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 144F32194EB64 for ; Wed, 19 Apr 2017 19:50:53 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2017 19:50:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,223,1488873600"; d="scan'208";a="89983457" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.25]) by orsmga005.jf.intel.com with ESMTP; 19 Apr 2017 19:50:49 -0700 From: Ruiyu Ni To: edk2-devel@lists.01.org Cc: Hao A Wu , Dandan Bi Date: Thu, 20 Apr 2017 10:50:43 +0800 Message-Id: <20170420025043.66620-2-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.12.2.windows.2 In-Reply-To: <20170420025043.66620-1-ruiyu.ni@intel.com> References: <20170420025043.66620-1-ruiyu.ni@intel.com> Subject: [PATCH] ShellPkg/pci: Fix VS2012 build failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2017 02:50:53 -0000 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Hao A Wu Cc: Dandan Bi --- ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c index 99335f05c5..38559571c2 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c @@ -2885,6 +2885,7 @@ ShellCommandRunPci ( ); ExtendedConfigSpace = NULL; + ExtendedConfigSize = 0; PcieCapabilityPtr = LocatePciCapability (&ConfigSpace, EFI_PCI_CAPABILITY_ID_PCIEXP); if (PcieCapabilityPtr != 0) { ExtendedConfigSize = 0x1000 - EFI_PCIE_CAPABILITY_BASE_OFFSET; @@ -2922,7 +2923,7 @@ ShellCommandRunPci ( // if (ExplainData) { PciExplainPci (&ConfigSpace, Address, IoDev); - if ((PcieCapabilityPtr != 0) && !ShellGetExecutionBreakFlag ()) { + if ((ExtendedConfigSpace != NULL) && !ShellGetExecutionBreakFlag ()) { PciExplainPciExpress ( (PCI_CAPABILITY_PCIEXP *) ((UINT8 *) &ConfigSpace + PcieCapabilityPtr), ExtendedConfigSpace, -- 2.12.2.windows.2