]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformPei: suppress wrong VS2008 warning (use of uninited local)
authorLaszlo Ersek <lersek@redhat.com>
Fri, 18 Mar 2016 23:08:47 +0000 (00:08 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Sat, 19 Mar 2016 01:24:47 +0000 (02:24 +0100)
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 <dwmw2@infradead.org>
Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/8871/focus=9431
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: David Woodhouse <David.Woodhouse@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
OvmfPkg/PlatformPei/Platform.c

index 0fc227803a84366e5f339402173ad0c04b7b0a77..509343e0bee52e29b637048668bb3a42c4c5f6e9 100644 (file)
@@ -217,6 +217,7 @@ MemMapInitialization (
     UINT32  PciSize;\r
 \r
     TopOfLowRam = GetSystemMemorySizeBelow4gb ();\r
+    PciExBarBase = 0;\r
     if (mHostBridgeDevId == INTEL_Q35_MCH_DEVICE_ID) {\r
       //\r
       // The MMCONFIG area is expected to fall between the top of low RAM and\r