From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.3876.1583987423428836981 for ; Wed, 11 Mar 2020 21:30:23 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Mar 2020 21:30:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,543,1574150400"; d="scan'208";a="354040133" Received: from shwde7172.ccr.corp.intel.com ([10.239.158.67]) by fmsmga001.fm.intel.com with ESMTP; 11 Mar 2020 21:30:21 -0700 From: "Liming Gao" To: devel@edk2.groups.io Cc: Laszlo Ersek , Ard Biesheuvel Subject: [patch v2] OvmfPkg: Fix build failure with VS2015 tool chain Date: Thu, 12 Mar 2020 12:30:08 +0800 Message-Id: <20200312043008.1389-1-liming.gao@intel.com> X-Mailer: git-send-email 2.24.1.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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..1f02da2503 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); -- 2.13.0.windows.1