diff options
author | Kinsey Moore <kinsey.moore@oarcorp.com> | 2023-09-25 15:32:23 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2023-09-26 09:02:48 -0500 |
commit | f3f8aa5b9bc4da82a71fc4c12a35a67838a13e1b (patch) | |
tree | 4f3bebf9311fdba70b3f03b9d330504e38185dd5 /cpukit | |
parent | 99c637fbd973a3d2f6e5adf38aac8f3f588cbb7e (diff) |
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.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/libdl/rtl-mdreloc-aarch64.c | 7 | ||||
-rw-r--r-- | cpukit/score/cpu/aarch64/include/rtems/score/cpuimpl.h | 2 |
2 files changed, 6 insertions, 3 deletions
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 |