From 82ad3746f916fbddf7f05bcce0eb72582b4068a9 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 21 Oct 2025 03:08:58 +0200 Subject: [PATCH] validation: Remove unused parameters Remove actually unused parameters which would have been flagged by a warning. --- testsuites/validation/tc-basedefs.c | 10 +++------- testsuites/validation/tc-ratemon-cancel.c | 14 ++++++-------- testsuites/validation/tr-event-send-receive.c | 9 ++------- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/testsuites/validation/tc-basedefs.c b/testsuites/validation/tc-basedefs.c index 88e4bbbed2..c1bfe210a5 100644 --- a/testsuites/validation/tc-basedefs.c +++ b/testsuites/validation/tc-basedefs.c @@ -527,11 +527,9 @@ RTEMS_CONST static int const_func( int arg ) } RTEMS_COMPILER_NO_RETURN_ATTRIBUTE - static void compiler_no_return_attribute_func( int i ); -static void compiler_no_return_attribute_func( int i ) + static void compiler_no_return_attribute_func( void ); +static void compiler_no_return_attribute_func( void ) { - (void) i; - while ( true ) { /* Loop forever */ } @@ -577,10 +575,8 @@ RTEMS_NO_INLINE static int no_inline_func( void ) return 75; } -RTEMS_NO_RETURN static void no_return_func( int i ) +RTEMS_NO_RETURN static void no_return_func( void ) { - (void) i; - while ( true ) { /* Loop forever */ } diff --git a/testsuites/validation/tc-ratemon-cancel.c b/testsuites/validation/tc-ratemon-cancel.c index 6f626d020d..0e9ea52264 100644 --- a/testsuites/validation/tc-ratemon-cancel.c +++ b/testsuites/validation/tc-ratemon-cancel.c @@ -270,14 +270,10 @@ static const rtems_task_priority background_task_priority = 100; static const rtems_task_priority foreground_task_priority = 10; static const rtems_event_set wake_main_task_event = RTEMS_EVENT_17; -static void TickTheClock( - RtemsRatemonReqCancel_Context *ctx, - uint32_t ticks -) +static void TickTheClock( uint32_t ticks ) { - (void) ctx; - uint32_t i; + for ( i = 0; i < ticks; ++i ) { TimecounterTick(); } @@ -327,14 +323,16 @@ static void CreatePostponedJobs( ) { rtems_status_code status; + ctx->postponed_jobs_count = jobs_count; + if ( ctx->previous_state == RATE_MONOTONIC_ACTIVE ) { - TickTheClock( ctx, ( jobs_count + 1 ) * period_length ); + TickTheClock( ( jobs_count + 1 ) * period_length ); status = rtems_rate_monotonic_period( ctx->period_id, period_length ); T_rsc( status, RTEMS_TIMEOUT ); } else { /* ctx->previous_state == RATE_MONOTONIC_INACTIVE || _EXPIRED */ - TickTheClock( ctx, jobs_count * period_length ); + TickTheClock( jobs_count * period_length ); } } diff --git a/testsuites/validation/tr-event-send-receive.c b/testsuites/validation/tr-event-send-receive.c index 47027f1eca..c048f64ebd 100644 --- a/testsuites/validation/tr-event-send-receive.c +++ b/testsuites/validation/tr-event-send-receive.c @@ -387,19 +387,14 @@ static bool IntendsToBlockForEvent( Context *ctx, Thread_Wait_flags flags ) return flags == ( ctx->wait_class | THREAD_WAIT_STATE_INTEND_TO_BLOCK ); } -static bool IsReady( Context *ctx, Thread_Wait_flags flags ) +static bool IsReady( Thread_Wait_flags flags ) { - (void) ctx; - return flags == THREAD_WAIT_STATE_READY; } static bool IsSatisfiedFlags( Context *ctx ) { - return IsReady( - ctx, - _Thread_Wait_flags_get( ctx->runner_thread ) - ); + return IsReady( _Thread_Wait_flags_get( ctx->runner_thread ) ); } static bool IsSatisfiedState( Context *ctx )