* [Patch] OvmfPkg: Fix build failure with VS2015 tool chain
@ 2020-03-12 2:26 Liming Gao
0 siblings, 0 replies; only message in thread
From: Liming Gao @ 2020-03-12 2:26 UTC (permalink / raw)
To: devel; +Cc: Laszlo Ersek, Ard Biesheuvel
warning C4244: '=': conversion from 'UINT64' to 'UINTN', 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>
---
OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c | 2 +-
OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c b/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
index 1868c9fcaf..e52ec668f3 100644
--- a/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
+++ b/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c
@@ -384,7 +384,7 @@ QemuLoadKernelImage (
//
// Drop the terminating NUL, convert to UTF-16.
//
- KernelLoadedImage->LoadOptionsSize = (CommandLineSize - 1) * 2;
+ KernelLoadedImage->LoadOptionsSize = (UINT32) ((CommandLineSize - 1) * 2);
}
QemuFwCfgSelectItem (QemuFwCfgItemInitrdSize);
diff --git a/OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.c b/OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.c
index 021b072826..da40c379a6 100644
--- a/OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.c
+++ b/OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.c
@@ -196,7 +196,7 @@ CacheInitrdFile (
ASSERT_EFI_ERROR (Status);
}
- mInitrdFileSize = FileSize;
+ mInitrdFileSize = (UINTN) FileSize;
return EFI_SUCCESS;
FreeMemory:
--
2.13.0.windows.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-12 2:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-12 2:26 [Patch] OvmfPkg: Fix build failure with VS2015 tool chain Liming Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox