From 5a8bc527b32b4ff7e2f8879c5d71ecd9dfdc61b4 Mon Sep 17 00:00:00 2001 From: Bob Feng Date: Tue, 10 Mar 2020 16:44:26 +0800 Subject: [PATCH] OvmfPkg/LinuxInitrdDynamicShellCommand: Cast UNIT64 to UNITN in assignment REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2580 Ovmf build failed on Windows with VS2017 tool chain. The error message like: OvmfPkg\LinuxInitrdDynamicShellCommand\LinuxInitr dDynamicShellCommand.c(199): error C2220: warning treated as error - no 'object' file generated OvmfPkg\LinuxInitrdDynamicShellCommand\LinuxInitrdDynamicShellCommand.c(199): warning C4244: '=': conversion from 'UINT64' to 'UINTN', possible loss of data This patch is to cast UINT64 type to UINTN type when doing the variable assignment. Signed-off-by: Bob Feng Cc: Ard Biesheuvel Cc: Laszlo Ersek Reviewed-by: Laszlo Ersek --- .../LinuxInitrdDynamicShellCommand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.c b/OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.c index 021b072826..07baa0e8d1 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: