diff options
author | Laszlo Ersek <lersek@redhat.com> | 2020-03-07 00:04:42 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-03-08 19:45:39 +0000 |
commit | a3e25cc8a1dd3d1ea24ed02f90c44221e015e965 (patch) | |
tree | 873db1208240826883f2c3ba26ebd078d7802d11 /BaseTools/Source/Python/CommonDataClass/CommonClass.py | |
parent | 40d572f70dc10cbacb331c1f0757000195656087 (diff) | |
download | edk2-a3e25cc8a1dd3d1ea24ed02f90c44221e015e965.tar.gz edk2-a3e25cc8a1dd3d1ea24ed02f90c44221e015e965.tar.bz2 edk2-a3e25cc8a1dd3d1ea24ed02f90c44221e015e965.zip |
OvmfPkg/X86QemuLoadImageLib: fix "unused variable" error in X64 DXE builds
When the MDE_CPU_IA32 macro is not defined, there is no access to the
"KernelImageHandle" local variable in QemuStartKernelImage(). This breaks
the OvmfPkgIa32X64 and OvmfPkgX64 platform builds, at least with gcc-8.
Move the local variable to the inner scope, where declaration and usage
are inseparable.
(Note that such inner-scope declarations are frowned upon in the wider
edk2 codebase, but we use them liberally in ArmVirtPkg and OvmfPkg anyway,
because they help us reason about variable lifetime and visibility.)
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Fixes: 7c47d89003a6f8f7f6f0ce8ca7d3e87c630d14cc
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2572
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'BaseTools/Source/Python/CommonDataClass/CommonClass.py')
0 files changed, 0 insertions, 0 deletions