summaryrefslogtreecommitdiffstats
path: root/PcAtChipsetPkg
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2017-11-22 09:54:10 +0800
committerHao Wu <hao.a.wu@intel.com>2017-11-23 08:43:21 +0800
commit2d3a626e3e9577348f9ef4cf6b3118d5e81063cf (patch)
tree1ea62caf00bea65a3115809315f6eb98e356d4ea /PcAtChipsetPkg
parent8284b1791ea99416db42075626d7098fa4f89598 (diff)
downloadedk2-2d3a626e3e9577348f9ef4cf6b3118d5e81063cf.tar.gz
edk2-2d3a626e3e9577348f9ef4cf6b3118d5e81063cf.tar.bz2
edk2-2d3a626e3e9577348f9ef4cf6b3118d5e81063cf.zip
PcAtChipsetPkg/IsaAcpiDxe: Fix VS2012 build failure
Done: if (EFI_ERROR (Status)) { if (PciIo != NULL && Enabled) { PciIo->Attributes ( PciIo, EfiPciIoAttributeOperationSet, OriginalAttributes, NULL ); } } In above codes, VS2012/VS2010 will report that "OriginalAttributes" will be used without initialization. But in fact, when the if expression is true(if (PciIo != NULL && Enabled)), the "OriginalAttributes" must be initialized. In order to fix this false positive issue, we initialize the "OriginalAttributes" after declaration. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'PcAtChipsetPkg')
-rw-r--r--PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c b/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c
index d82e2c4641..c7ea559006 100644
--- a/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c
+++ b/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c
@@ -178,6 +178,7 @@ PcatIsaAcpiDriverBindingStart (
Enabled = FALSE;
Supports = 0;
PcatIsaAcpiDev = NULL;
+ OriginalAttributes = 0;
//
// Open the PCI I/O Protocol Interface
//