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: