From f3f8aa5b9bc4da82a71fc4c12a35a67838a13e1b Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Mon, 25 Sep 2023 15:32:23 -0500 Subject: cpukit/aarch64: Resolve warnings with ILP32 ABI Casts from uint64_t to void* must go through a uintptr_t cast to avoid warnings when building with the ILP32 ABI since this is otherwise an implicit truncation to 32bits for a pointer. --- cpukit/libdl/rtl-mdreloc-aarch64.c | 7 +++++-- cpukit/score/cpu/aarch64/include/rtems/score/cpuimpl.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'cpukit') diff --git a/cpukit/libdl/rtl-mdreloc-aarch64.c b/cpukit/libdl/rtl-mdreloc-aarch64.c index 792dc91b2e..1eb1d1e87d 100644 --- a/cpukit/libdl/rtl-mdreloc-aarch64.c +++ b/cpukit/libdl/rtl-mdreloc-aarch64.c @@ -424,8 +424,11 @@ rtems_rtl_elf_reloc_rela (rtems_rtl_obj* obj, } if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) - printf ("rtl: JUMP26/PC26/CALL: insn=%p where=%p target=%p raddr=%p parsing=%d\n", - insn, (void*) where, (void*) target, (void*) raddr, parsing); + printf ( + "rtl: JUMP26/PC26/CALL: insn=%p where=%p target=%p raddr=%p parsing=%d\n", + insn, (void*) where, (void*)(uintptr_t) target, (void*)(uintptr_t) raddr, + parsing + ); target = (intptr_t)target >> 2; diff --git a/cpukit/score/cpu/aarch64/include/rtems/score/cpuimpl.h b/cpukit/score/cpu/aarch64/include/rtems/score/cpuimpl.h index 095c5db5b9..8a0e476899 100644 --- a/cpukit/score/cpu/aarch64/include/rtems/score/cpuimpl.h +++ b/cpukit/score/cpu/aarch64/include/rtems/score/cpuimpl.h @@ -178,7 +178,7 @@ static inline void *_CPU_Get_TLS_thread_pointer( const Context_Control *context ) { - return (void *) context->thread_id; + return (void *)(uintptr_t) context->thread_id; } #ifdef __cplusplus -- cgit v1.2.3