]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/AcpiPlatformDxe: fix spurious uninitialized var warning
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 8 Jun 2017 19:03:04 +0000 (19:03 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 9 Jun 2017 08:57:39 +0000 (08:57 +0000)
Commit 4275f38507a4 ("OvmfPkg/AcpiPlatformDxe: alloc blobs from 64-bit
space unless restricted") introduced a variable which is [incorrectly]
identified by GCC as being potentially uninitialized. So let's just set
it to NULL before use.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c

index 98be36c64b436f07abdb66eae5792a9ca0bed424..a0b1cfd2be05e9e9a08fbe5f5bd0b377f7ad3662 100644 (file)
@@ -1001,6 +1001,7 @@ InstallQemuFwCfgTables (
   RestorePciDecoding (OriginalPciAttributes, OriginalPciAttributesCount);\r
   LoaderEnd = LoaderStart + FwCfgSize / sizeof *LoaderEntry;\r
 \r
+  AllocationsRestrictedTo32Bit = NULL;\r
   Status = CollectAllocationsRestrictedTo32Bit (\r
              &AllocationsRestrictedTo32Bit,\r
              LoaderStart,\r