Skip to content

Commit 94b551b

Browse files
committed
MdeModulePkg: Fix clang build regressions.
Address the build regressions, introduced in #11724, #11688, #11686 #11685. These build regressions are for uninitialized variables before use. Signed-off-by: Aaron Pop <[email protected]>
1 parent af9cc80 commit 94b551b

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,11 +1607,15 @@ GetFullSmramRanges (
16071607
UINTN MaxCount;
16081608
BOOLEAN Rescan;
16091609

1610+
SmmConfiguration = NULL;
1611+
TempSmramRanges = NULL;
1612+
SmramReservedRanges = NULL;
1613+
SmramRanges = NULL;
1614+
16101615
//
16111616
// Get SMM Configuration Protocol if it is present.
16121617
//
1613-
SmmConfiguration = NULL;
1614-
Status = gBS->LocateProtocol (&gEfiSmmConfigurationProtocolGuid, NULL, (VOID **)&SmmConfiguration);
1618+
Status = gBS->LocateProtocol (&gEfiSmmConfigurationProtocolGuid, NULL, (VOID **)&SmmConfiguration);
16151619

16161620
//
16171621
// Get SMRAM information.

MdeModulePkg/Universal/BdsDxe/BdsEntry.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,7 @@ BdsEntry (
699699

700700
HotkeyTriggered = NULL;
701701
Status = EFI_SUCCESS;
702+
BootSuccess = FALSE;
702703

703704
//
704705
// Insert the performance probe

MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,7 @@ CompareNameElementDefault (
795795

796796
AppendString = NULL;
797797
NvConfigExist = NULL;
798+
Status = EFI_OUT_OF_RESOURCES;
798799
//
799800
// Make NvConfigPtr point to the first <NvConfig> with AltConfigHdr in DefaultAltCfgResp.
800801
//

MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,11 @@ CreateStorage (
430430
EFI_GUID *StorageGuid;
431431
CHAR8 *StorageName;
432432

433-
UnicodeString = NULL;
434-
StorageName = NULL;
433+
UnicodeString = NULL;
434+
StorageName = NULL;
435+
BrowserStorage = NULL;
436+
Storage = NULL;
437+
435438
switch (StorageType) {
436439
case EFI_HII_VARSTORE_BUFFER:
437440
StorageGuid = (EFI_GUID *)(CHAR8 *)&((EFI_IFR_VARSTORE *)OpCodeData)->Guid;

0 commit comments

Comments
 (0)