From 8f98c76f992be0d22cafaf302ee95350cef3f0c7 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Thu, 8 Jun 2017 19:03:04 +0000 Subject: [PATCH] OvmfPkg/AcpiPlatformDxe: fix spurious uninitialized var warning 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 Reviewed-by: Laszlo Ersek --- OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c index 98be36c64b..a0b1cfd2be 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c @@ -1001,6 +1001,7 @@ InstallQemuFwCfgTables ( RestorePciDecoding (OriginalPciAttributes, OriginalPciAttributesCount); LoaderEnd = LoaderStart + FwCfgSize / sizeof *LoaderEntry; + AllocationsRestrictedTo32Bit = NULL; Status = CollectAllocationsRestrictedTo32Bit ( &AllocationsRestrictedTo32Bit, LoaderStart, -- 2.39.2