mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
OvmfPkg/EnrollDefaultKeys: suppress incorrect compiler warning
When building OvmfPkg/EnrollDefaultKeys for IA32 with gcc-4.8 for the DEBUG target (and possibly under other build configurations too), the compiler incorrectly reports, > OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c: In function > 'ShellAppMain': > OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c:631:10: error: > 'SizeOfPkKek1' may be used uninitialized in this function > [-Werror=maybe-uninitialized] > Status = EnrollListOfCerts ( > ^ > OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c:703:12: error: 'PkKek1' > may be used uninitialized in this function [-Werror=maybe-uninitialized] > FreePool (PkKek1); > ^ > cc1: all warnings being treated as errors Suppress this warning, in the style suggested under <https://bugzilla.tianocore.org/show_bug.cgi?id=607>. Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Fixes: be9470b3c91fc50436c15a76c85cdde940355b9f Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
parent
273190e189
commit
727d7ebaa9
@ -558,6 +558,13 @@ ShellAppMain (
|
||||
return RetVal;
|
||||
}
|
||||
|
||||
//
|
||||
// Set PkKek1 and SizeOfPkKek1 to suppress incorrect compiler/analyzer
|
||||
// warnings.
|
||||
//
|
||||
PkKek1 = NULL;
|
||||
SizeOfPkKek1 = 0;
|
||||
|
||||
//
|
||||
// Fetch the X509 certificate (to be used as Platform Key and first Key
|
||||
// Exchange Key) from SMBIOS.
|
||||
|
Loading…
x
Reference in New Issue
Block a user