mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg/Bds: Fix compiler warning
- Fix RVCT warning: 'SecondEntry' may be uninitialised. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15904 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d340ef7542
commit
749d91f7aa
|
@ -691,6 +691,7 @@ BootMenuReorderBootOptions (
|
|||
}
|
||||
|
||||
SelectedEntry = &BootOptionEntry->Link;
|
||||
SecondEntry = NULL;
|
||||
// Note down the previous entry in the list to be able to cancel changes
|
||||
PrevEntry = GetPreviousNode (BootOptionsList, SelectedEntry);
|
||||
|
||||
|
@ -739,7 +740,9 @@ BootMenuReorderBootOptions (
|
|||
} while ((!Move) && (!Save) && (!Cancel));
|
||||
|
||||
if (Move) {
|
||||
SwapListEntries (SelectedEntry, SecondEntry);
|
||||
if ((SelectedEntry != NULL) && (SecondEntry != NULL)) {
|
||||
SwapListEntries (SelectedEntry, SecondEntry);
|
||||
}
|
||||
} else {
|
||||
if (Save) {
|
||||
Status = GetGlobalEnvironmentVariable (
|
||||
|
|
Loading…
Reference in New Issue