public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] OvmfPkg/AcpiPlatformDxe: fix spurious uninitialized var warning
@ 2017-06-08 19:05 Ard Biesheuvel
  2017-06-08 22:18 ` Laszlo Ersek
  0 siblings, 1 reply; 3+ messages in thread
From: Ard Biesheuvel @ 2017-06-08 19:05 UTC (permalink / raw)
  To: edk2-devel, lersek, jordan.l.justen; +Cc: Ard Biesheuvel

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>
---
 OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
index 98be36c64b43..a0b1cfd2be05 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.9.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-09  8:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-08 19:05 [PATCH] OvmfPkg/AcpiPlatformDxe: fix spurious uninitialized var warning Ard Biesheuvel
2017-06-08 22:18 ` Laszlo Ersek
2017-06-09  8:58   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox