]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: Fix build failure with VS2015 tool chain
authorLiming Gao <liming.gao@intel.com>
Thu, 12 Mar 2020 04:30:08 +0000 (12:30 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 17 Mar 2020 00:28:45 +0000 (00:28 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2582
warning C4244: '=': conversion from 'UINTN' to 'UINT32', possible loss of data
With this fix, OvmfIa32, OvmfX64 and OvmfIa32X64 can pass build.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c

index 1868c9fcafdf3642ad6eb101d37b1721dd7e585c..e52ec668f3751624522ac59a984fc119f0b558d1 100644 (file)
@@ -384,7 +384,7 @@ QemuLoadKernelImage (
     //\r
     // Drop the terminating NUL, convert to UTF-16.\r
     //\r
-    KernelLoadedImage->LoadOptionsSize = (CommandLineSize - 1) * 2;\r
+    KernelLoadedImage->LoadOptionsSize = (UINT32) ((CommandLineSize - 1) * 2);\r
   }\r
 \r
   QemuFwCfgSelectItem (QemuFwCfgItemInitrdSize);\r