From 60d9f5f43bbb7e0a859c1f744a20cee88af9c863 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Mon, 24 Oct 2016 13:33:02 +0100 Subject: ArmPlatformPkg/NorFlashDxe: eliminate void pointer arithmetic While most compilers happily allow arithmetic on void pointer, the RVCT compiler does not, and throws the following warning for NorFlashDxe: ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c(894,48) : error #1254-D: arithmetic on pointer to void or function type Since the expression in question involves a cast from UINTN to VOID*, simply add some parentheses to eliminate this warning. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek Reviewed-by: Ryan Harkin Reviewed-by: Leif Lindholm --- ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ArmPlatformPkg') diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c index ca61ac5e19..1098d9501c 100644 --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c @@ -891,7 +891,7 @@ NorFlashRead ( SEND_NOR_COMMAND (Instance->DeviceBaseAddress, 0, P30_CMD_READ_ARRAY); // Readout the data - AlignedCopyMem (Buffer, (VOID *)StartAddress + Offset, BufferSizeInBytes); + AlignedCopyMem (Buffer, (VOID *)(StartAddress + Offset), BufferSizeInBytes); return EFI_SUCCESS; } -- cgit v1.2.3