From: Ard Biesheuvel Date: Mon, 24 Oct 2016 17:32:12 +0000 (+0100) Subject: EmbeddedPkg/GdbDebugAgent: fix VOID* cast of incorrect size X-Git-Tag: edk2-stable201903~5408 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=15d8747a5f0fea5f30d6d4f812f6aa3bbd4c5ba8 EmbeddedPkg/GdbDebugAgent: fix VOID* cast of incorrect size 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 Reviewed-by: Laszlo Ersek Reviewed-by: Leif Lindholm --- diff --git a/EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c b/EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c index 8226c80ab4..a43ff95d03 100644 --- a/EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c +++ b/EmbeddedPkg/Library/GdbDebugAgent/Arm/Processor.c @@ -657,7 +657,7 @@ InitializeDebugAgent ( *(UINTN *) (((UINT8 *)VectorBase) + Offset) = (UINTN)AsmCommonExceptionEntry; // Flush Caches since we updated executable stuff - InvalidateInstructionCacheRange ((VOID *)PcdGet64(PcdCpuVectorBaseAddress), Length); + InvalidateInstructionCacheRange ((VOID *)(UINTN)PcdGet64(PcdCpuVectorBaseAddress), Length); // setup a timer so gdb can break in via ctrl-c DebugAgentTimerIntialize ();