mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-24 22:24:37 +02:00
ShellPkg: fix warnings about uninitialized variable
Dmem.c: In function 'GetImageExecutionInfo': Dmem.c:241:10: error: 'Status' may be used uninitialized in this function [-Werror=maybe-uninitialized] return Status; ^~~~~~ Dmem.c:284:35: note: 'Status' was declared here EFI_STATUS Status; ^~~~~~ Dmem.c: In function 'ShellCommandRunDmem': Dmem.c:586:27: error: 'ConformanceProfileTableAddress' may be used uninitialized in this function [-Werror=maybe-uninitialized] ShellStatus = DisplayConformanceProfiles (ConformanceProfileTableAddress); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dmem.c:582:27: error: 'ImageExecutionTableAddress' may be used uninitialized in this function [-Werror=maybe-uninitialized] ShellStatus = DisplayImageExecutionEntries (ImageExecutionTableAddress); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dmem.c:578:27: error: 'RtPropertiesTableAddress' may be used uninitialized in this function [-Werror=maybe-uninitialized] ShellStatus = DisplayRtProperties (RtPropertiesTableAddress); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
This commit is contained in:
parent
755d4b9397
commit
254937f0bc
@ -192,6 +192,8 @@ GetImageExecutionInfo (
|
|||||||
|
|
||||||
ptr = (CHAR8 *)ExecInfoTablePtr + 1;
|
ptr = (CHAR8 *)ExecInfoTablePtr + 1;
|
||||||
|
|
||||||
|
Status = EFI_NOT_FOUND;
|
||||||
|
|
||||||
for (Image = 0; Image < *NumberOfImages; Image++, ptr += InfoPtr->InfoSize) {
|
for (Image = 0; Image < *NumberOfImages; Image++, ptr += InfoPtr->InfoSize) {
|
||||||
InfoPtr = (EFI_IMAGE_EXECUTION_INFO *)ptr;
|
InfoPtr = (EFI_IMAGE_EXECUTION_INFO *)ptr;
|
||||||
ImagePath = (CHAR16 *)(InfoPtr + 1);
|
ImagePath = (CHAR16 *)(InfoPtr + 1);
|
||||||
@ -287,6 +289,7 @@ DisplayConformanceProfiles (
|
|||||||
UINTN Profile;
|
UINTN Profile;
|
||||||
EFI_CONFORMANCE_PROFILES_TABLE *ConfProfTable;
|
EFI_CONFORMANCE_PROFILES_TABLE *ConfProfTable;
|
||||||
|
|
||||||
|
Status = EFI_SUCCESS;
|
||||||
ShellStatus = SHELL_SUCCESS;
|
ShellStatus = SHELL_SUCCESS;
|
||||||
|
|
||||||
if (Address != 0) {
|
if (Address != 0) {
|
||||||
@ -571,19 +574,19 @@ ShellCommandRunDmem (
|
|||||||
HiiDatabaseExportBufferAddress,
|
HiiDatabaseExportBufferAddress,
|
||||||
ConformanceProfileTableAddress
|
ConformanceProfileTableAddress
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
if (ShellCommandLineGetFlag (Package, L"-verbose")) {
|
if (ShellCommandLineGetFlag (Package, L"-verbose")) {
|
||||||
if (ShellStatus == SHELL_SUCCESS) {
|
if (ShellStatus == SHELL_SUCCESS) {
|
||||||
ShellStatus = DisplayRtProperties (RtPropertiesTableAddress);
|
ShellStatus = DisplayRtProperties (RtPropertiesTableAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ShellStatus == SHELL_SUCCESS) {
|
if (ShellStatus == SHELL_SUCCESS) {
|
||||||
ShellStatus = DisplayImageExecutionEntries (ImageExecutionTableAddress);
|
ShellStatus = DisplayImageExecutionEntries (ImageExecutionTableAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ShellStatus == SHELL_SUCCESS) {
|
if (ShellStatus == SHELL_SUCCESS) {
|
||||||
ShellStatus = DisplayConformanceProfiles (ConformanceProfileTableAddress);
|
ShellStatus = DisplayConformanceProfiles (ConformanceProfileTableAddress);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user