From f89a27b40f38a3dee40c79762d17a3c206c94d18 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 10 Oct 2025 11:55:57 -0500 Subject: [PATCH] cpukit aarch64: Address unused parameter warnings Add "(void) param;" annotation to address unused parameter warnings. Found with GCC's warning -Wunused-parameter. --- cpukit/libdebugger/rtems-debugger-aarch64.c | 9 ++++++++ cpukit/libdl/rtl-mdreloc-aarch64.c | 22 +++++++++++++++++++ .../score/cpu/aarch64/aarch64-thread-idle.c | 2 ++ cpukit/score/cpu/aarch64/cpu.c | 1 + 4 files changed, 34 insertions(+) diff --git a/cpukit/libdebugger/rtems-debugger-aarch64.c b/cpukit/libdebugger/rtems-debugger-aarch64.c index e9fe65f2a8..df0e0761ea 100644 --- a/cpukit/libdebugger/rtems-debugger-aarch64.c +++ b/cpukit/libdebugger/rtems-debugger-aarch64.c @@ -450,6 +450,8 @@ static const char *aarch64_mode_label( int mode ) static int aarch64_debug_probe( rtems_debugger_target *target ) { + (void) target; + int debug_version; uint64_t val; const char *vl = "[Invalid version]"; @@ -750,6 +752,8 @@ int rtems_debugger_target_configure( rtems_debugger_target *target ) static void target_print_frame( CPU_Exception_frame *frame ) { + (void) frame; + EXC_FRAME_PRINT( target_printk, "[} ", frame ); } @@ -1736,6 +1740,11 @@ int rtems_debugger_target_hwbreak_control( DB_UINT kind ) { + (void) wp; + (void) insert; + (void) addr; + (void) kind; + /* To do. */ return 0; } diff --git a/cpukit/libdl/rtl-mdreloc-aarch64.c b/cpukit/libdl/rtl-mdreloc-aarch64.c index e93dfb448d..1ce4240021 100644 --- a/cpukit/libdl/rtl-mdreloc-aarch64.c +++ b/cpukit/libdl/rtl-mdreloc-aarch64.c @@ -179,6 +179,9 @@ uint32_t rtems_rtl_elf_section_flags (const rtems_rtl_obj* obj, const Elf_Shdr* shdr) { + (void) obj; + (void) shdr; + return 0; } @@ -217,6 +220,8 @@ rtems_rtl_elf_arch_section_free (const rtems_rtl_obj* obj, bool rtems_rtl_elf_rel_resolve_sym (Elf_Word type) { + (void) type; + return true; } @@ -229,6 +234,9 @@ rtems_rtl_elf_reloc_rela (rtems_rtl_obj* obj, const Elf_Word symvalue, const bool parsing) { + (void) symname; + (void) syminfo; + Elf64_Addr *where; Elf32_Addr *where32; Elf_Addr off = rela->r_offset; @@ -559,6 +567,13 @@ rtems_rtl_elf_relocate_rel_tramp (rtems_rtl_obj* obj, const Elf_Byte syminfo, const Elf_Word symvalue) { + (void) obj; + (void) rel; + (void) sect; + (void) symname; + (void) syminfo; + (void) symvalue; + rtems_rtl_set_error (EINVAL, "rela type record not supported"); return rtems_rtl_elf_rel_failure; } @@ -571,6 +586,13 @@ rtems_rtl_elf_relocate_rel (rtems_rtl_obj* obj, const Elf_Byte syminfo, const Elf_Word symvalue) { + (void) obj; + (void) rel; + (void) sect; + (void) symname; + (void) syminfo; + (void) symvalue; + rtems_rtl_set_error (EINVAL, "rela type record not supported"); return rtems_rtl_elf_rel_failure; } diff --git a/cpukit/score/cpu/aarch64/aarch64-thread-idle.c b/cpukit/score/cpu/aarch64/aarch64-thread-idle.c index cbaa29a166..3575d02404 100644 --- a/cpukit/score/cpu/aarch64/aarch64-thread-idle.c +++ b/cpukit/score/cpu/aarch64/aarch64-thread-idle.c @@ -43,6 +43,8 @@ void *_CPU_Thread_Idle_body( uintptr_t ignored ) { + (void) ignored; + while ( true ) { __asm__ volatile ("wfi"); } diff --git a/cpukit/score/cpu/aarch64/cpu.c b/cpukit/score/cpu/aarch64/cpu.c index 88df9d6e02..e599752d8a 100644 --- a/cpukit/score/cpu/aarch64/cpu.c +++ b/cpukit/score/cpu/aarch64/cpu.c @@ -134,6 +134,7 @@ void _CPU_Context_Initialize( ) { (void) new_level; + (void) is_fp; the_context->register_sp = (uintptr_t) stack_area_begin + stack_area_size; the_context->register_lr = (uintptr_t) entry_point;