summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-05-27 12:42:36 +0800
committerHao Wu <hao.a.wu@intel.com>2016-05-30 11:44:57 +0800
commit3ab7066e8d8ae43d9cdee76600b90918f8bee5d9 (patch)
tree18878baaca06e7dee1c221a7adf0b58b138e8cc1
parent265fff39483bc2e1550bbb9546b9c330e6118e25 (diff)
downloadedk2-3ab7066e8d8ae43d9cdee76600b90918f8bee5d9.tar.gz
edk2-3ab7066e8d8ae43d9cdee76600b90918f8bee5d9.tar.bz2
edk2-3ab7066e8d8ae43d9cdee76600b90918f8bee5d9.zip
MdeModulePkg RamDiskDxe: Fix VS2010 build error
Potentially uninitialized local variables 'TableKey' and 'TableHeader' might be used in functions RamDiskPublishNfit() and RamDiskUnpublishNfit() in file RamDiskProtocol.c. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
-rw-r--r--MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c b/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c
index ed71849fb4..9383de496f 100644
--- a/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c
+++ b/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c
@@ -201,8 +201,10 @@ RamDiskPublishNfit (
//
// Determine whether there is a NFIT already in the ACPI table.
//
- Status = EFI_SUCCESS;
- TableIndex = 0;
+ Status = EFI_SUCCESS;
+ TableIndex = 0;
+ TableKey = 0;
+ TableHeader = NULL;
while (!EFI_ERROR (Status)) {
Status = mAcpiSdtProtocol->GetAcpiTable (
@@ -386,8 +388,10 @@ RamDiskUnpublishNfit (
//
// Find the NFIT in the ACPI table.
//
- Status = EFI_SUCCESS;
- TableIndex = 0;
+ Status = EFI_SUCCESS;
+ TableIndex = 0;
+ TableKey = 0;
+ TableHeader = NULL;
while (!EFI_ERROR (Status)) {
Status = mAcpiSdtProtocol->GetAcpiTable (