diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c index f2c4995395..2b529d58a1 100644 --- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c +++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c @@ -161,6 +161,11 @@ InstallOvmfFvTables ( TableInstallFunction = InstallAcpiTable; } + // + // set FwVol (and use an ASSERT() below) to suppress incorrect + // compiler/analyzer warnings + // + FwVol = NULL; // // Locate the firmware volume protocol // @@ -168,6 +173,8 @@ InstallOvmfFvTables ( if (EFI_ERROR (Status)) { return EFI_ABORTED; } + ASSERT (FwVol != NULL); + // // Read tables from the storage file. //