audk/OvmfPkg/QemuKernelLoaderFsDxe
Ard Biesheuvel 40d572f70d OvmfPkg/QemuKernelLoaderFsDxe: drop tentative const object definition
Bob reports that VS2017 chokes on a tentative definition of the const
object 'mEfiFileProtocolTemplate', with the following error:

  OvmfPkg\QemuKernelLoaderFsDxe\QemuKernelLoaderFsDxe.c(130):
      error C2220: warning treated as error - no 'object' file generated
  OvmfPkg\QemuKernelLoaderFsDxe\QemuKernelLoaderFsDxe.c(130):
      warning C4132: 'mEfiFileProtocolTemplate': const object should be initialized

Let's turn the only function that relies on this tentative definition
into a forward declaration itself, and move its definition after the
external definition of the object. That allows us to drop the tentative
definition of the const object, and hopefully make VS2017 happy.

Cc: "Feng, Bob C" <bob.c.feng@intel.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2020-03-08 19:45:39 +00:00
..
QemuKernelLoaderFsDxe.c OvmfPkg/QemuKernelLoaderFsDxe: drop tentative const object definition 2020-03-08 19:45:39 +00:00
QemuKernelLoaderFsDxe.inf OvmfPkg/QemuKernelLoaderFsDxe: add support for new Linux initrd device path 2020-03-05 19:45:05 +00:00