From a2c3bf1f2f991614ac97ddcf4b31742e4366c3a5 Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Thu, 12 Mar 2020 12:30:08 +0800 Subject: [PATCH] OvmfPkg: Fix build failure with VS2015 tool chain 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 Cc: Ard Biesheuvel Signed-off-by: Liming Gao Reviewed-by: Laszlo Ersek --- OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);