summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/LinuxInitrdDynamicShellCommand
diff options
context:
space:
mode:
authorBob Feng <bob.c.feng@intel.com>2020-03-10 16:44:26 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-03-12 02:10:23 +0000
commit5a8bc527b32b4ff7e2f8879c5d71ecd9dfdc61b4 (patch)
treefe08f408e5c9a0f03f632a221d501ad16d6bd44f /OvmfPkg/LinuxInitrdDynamicShellCommand
parent484b1534ed8fbee17cab958627e3707554843770 (diff)
downloadedk2-5a8bc527b32b4ff7e2f8879c5d71ecd9dfdc61b4.tar.gz
edk2-5a8bc527b32b4ff7e2f8879c5d71ecd9dfdc61b4.tar.bz2
edk2-5a8bc527b32b4ff7e2f8879c5d71ecd9dfdc61b4.zip
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 <bob.c.feng@intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'OvmfPkg/LinuxInitrdDynamicShellCommand')
-rw-r--r--OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.c2
1 files changed, 1 insertions, 1 deletions
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: