From 02d6f4ce0c84f2d7e9abfcde2e092a5701ff33c4 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Sat, 19 Mar 2016 00:08:47 +0100 Subject: [PATCH] OvmfPkg/PlatformPei: suppress wrong VS2008 warning (use of uninited local) VS2008 seems to think that the "PciExBarBase" variable (introduced in commit 7b8fe63561b4) can be evaluated for the AddReservedMemoryBaseSizeHob() function call with its value being uninitialized / indeterminate. This is not the case (see "mHostBridgeDevId"); suppress the warning. Reported-by: David Woodhouse Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/8871/focus=9431 Cc: David Woodhouse Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: David Woodhouse Reviewed-by: Jordan Justen --- OvmfPkg/PlatformPei/Platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index 0fc227803a..509343e0be 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -217,6 +217,7 @@ MemMapInitialization ( UINT32 PciSize; TopOfLowRam = GetSystemMemorySizeBelow4gb (); + PciExBarBase = 0; if (mHostBridgeDevId == INTEL_Q35_MCH_DEVICE_ID) { // // The MMCONFIG area is expected to fall between the top of low RAM and