diff mbox series

[edk2,platforms:,08/10] Marvell/Applications/SpiTool: Fix 32-bit issues

Message ID 1506304319-8620-9-git-send-email-mw@semihalf.com
State New
Headers show
Series None | expand

Commit Message

Marcin Wojtas Sept. 25, 2017, 1:51 a.m. UTC
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>


Fix casting and related issues to make this code build for 32-bit ARM.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Signed-off-by: Marcin Wojtas <mw@semihalf.com>

---
 Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
1.8.3.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c b/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c
index e6e1007..9321f6b 100644
--- a/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c
+++ b/Platform/Marvell/Applications/SpiTool/SpiFlashCmd.c
@@ -211,7 +211,8 @@  EFI_STATUS              Status;
   LIST_ENTRY            *CheckPackage;
   EFI_PHYSICAL_ADDRESS  Address = 0, Offset = 0;
   SHELL_FILE_HANDLE     FileHandle = NULL;
-  UINTN                 ByteCount, FileSize, I;
+  UINTN                 ByteCount, I;
+  UINT64                FileSize;
   UINT8                 *Buffer = NULL, *FileBuffer = NULL;
   CHAR16                *ProblemParam, *FilePath;
   CONST CHAR16          *AddressStr = NULL, *OffsetStr = NULL;
@@ -418,7 +419,7 @@  EFI_STATUS              Status;
     }
   }
 
-  Buffer = (UINT8 *) Address;
+  Buffer = (UINT8 *)(UINTN)Address;
   if (FileFlag) {
     Buffer = FileBuffer;
   }