diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-10-24 13:33:02 +0100 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-10-24 17:23:44 +0100 |
commit | 60d9f5f43bbb7e0a859c1f744a20cee88af9c863 (patch) | |
tree | a0148e446ede741cbc5005a79a4158c9a84f02b9 /ArmPlatformPkg/Drivers | |
parent | 3be743974a8e3cd2611b0b5a7feda7d2668d107b (diff) | |
download | edk2-60d9f5f43bbb7e0a859c1f744a20cee88af9c863.zip edk2-60d9f5f43bbb7e0a859c1f744a20cee88af9c863.tar.gz edk2-60d9f5f43bbb7e0a859c1f744a20cee88af9c863.tar.bz2 |
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 <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPlatformPkg/Drivers')
-rw-r--r-- | ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c index ca61ac5..1098d95 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;
}
|