]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg RamDiskDxe: Fix VS2010 build error
authorHao Wu <hao.a.wu@intel.com>
Fri, 27 May 2016 04:42:36 +0000 (12:42 +0800)
committerHao Wu <hao.a.wu@intel.com>
Mon, 30 May 2016 03:44:57 +0000 (11:44 +0800)
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>
MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskProtocol.c

index ed71849fb474f000230e673b4cd98e6193592720..9383de496f6776df7767c9279c760483bcdc3a1a 100644 (file)
@@ -201,8 +201,10 @@ RamDiskPublishNfit (
   //\r
   // Determine whether there is a NFIT already in the ACPI table.\r
   //\r
-  Status = EFI_SUCCESS;\r
-  TableIndex = 0;\r
+  Status      = EFI_SUCCESS;\r
+  TableIndex  = 0;\r
+  TableKey    = 0;\r
+  TableHeader = NULL;\r
 \r
   while (!EFI_ERROR (Status)) {\r
     Status = mAcpiSdtProtocol->GetAcpiTable (\r
@@ -386,8 +388,10 @@ RamDiskUnpublishNfit (
   //\r
   // Find the NFIT in the ACPI table.\r
   //\r
-  Status = EFI_SUCCESS;\r
-  TableIndex = 0;\r
+  Status      = EFI_SUCCESS;\r
+  TableIndex  = 0;\r
+  TableKey    = 0;\r
+  TableHeader = NULL;\r
 \r
   while (!EFI_ERROR (Status)) {\r
     Status = mAcpiSdtProtocol->GetAcpiTable (\r