mirror of https://github.com/acidanthera/audk.git
OvmfPkg: fix warning about uninitialized variable
GenericQemuLoadImageLib.c: In function 'QemuLoadKernelImage': GenericQemuLoadImageLib.c:323:5: error: 'CommandLine' may be used uninitialized in this function [-Werror=maybe-uninitialized] UnicodeSPrintAsciiFormat ( ^~~~~~~~~~~~~~~~~~~~~~~~~~ KernelLoadedImage->LoadOptions, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ KernelLoadedImage->LoadOptionsSize, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%a%a", ~~~~~~~ (CommandLineSize == 0) ? "" : CommandLine, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (InitrdSize == 0) ? "" : " initrd=initrd" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ); ~ cc1: all warnings being treated as errors Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
This commit is contained in:
parent
ceb87029c5
commit
755d4b9397
|
@ -301,6 +301,7 @@ QemuLoadKernelImage (
|
|||
}
|
||||
}
|
||||
|
||||
CommandLine = NULL;
|
||||
if (CommandLineSize == 0) {
|
||||
KernelLoadedImage->LoadOptionsSize = 0;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue