MdeModulePkg: PeiMain: fix warning about uninitialized variable

Dispatcher.c:1639:34: error: 'FvMigrationFlags' may be used uninitialized
  in this function [-Werror=maybe-uninitialized]
(((FvMigrationFlags & FLAGS_FV_MIGRATE_BEFORE_PEI_CORE_REENTRY) == 0) ||
                ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
This commit is contained in:
Mike Maslenkin 2025-01-09 21:04:53 +03:00 committed by Ard Biesheuvel
parent bba72ffbe1
commit a5cb67fb8d

View File

@ -1563,6 +1563,11 @@ EvacuateTempRam (
DEBUG ((DEBUG_VERBOSE, "Beginning evacuation of content in temporary RAM.\n"));
//
// By default migrate all FVs and copy raw data
//
FvMigrationFlags = FLAGS_FV_RAW_DATA_COPY;
//
// Migrate PPI Pointers of PEI_CORE from temporary memory to newly loaded PEI_CORE in permanent memory.
//
@ -1617,11 +1622,6 @@ EvacuateTempRam (
//
return EFI_SUCCESS;
}
//
// Migrate all FVs and copy raw data
//
FvMigrationFlags = FLAGS_FV_RAW_DATA_COPY;
} else {
for (Index = 0; Index < MigrationInfo->ToMigrateFvCount; Index++) {
ToMigrateFvInfo = ((TO_MIGRATE_FV_INFO *)(MigrationInfo + 1)) + Index;