EmbeddedPkg/GdbDebugAgent: fix VOID* cast of incorrect size
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 24 Oct 2016 17:32:12 +0000 (18:32 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 28 Oct 2016 12:51:41 +0000 (13:51 +0100)
The result of PcdGet64() can only be cast to VOID* on 64-bit platforms,
so add an intermediate UINTN cast to make this code build again on 32 bit.

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: Leif Lindholm <leif.lindholm@linaro.org>
EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c

index 8226c80..a43ff95 100644 (file)
@@ -657,7 +657,7 @@ InitializeDebugAgent (
   *(UINTN *) (((UINT8 *)VectorBase) + Offset) = (UINTN)AsmCommonExceptionEntry;\r
 \r
   // Flush Caches since we updated executable stuff\r
-  InvalidateInstructionCacheRange ((VOID *)PcdGet64(PcdCpuVectorBaseAddress), Length);\r
+  InvalidateInstructionCacheRange ((VOID *)(UINTN)PcdGet64(PcdCpuVectorBaseAddress), Length);\r
 \r
   // setup a timer so gdb can break in via ctrl-c\r
   DebugAgentTimerIntialize ();\r