From d8737d61cdffd6f1426a7fd3cc1ffb9e511677e9 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 25 Sep 2025 10:01:25 -0500 Subject: [PATCH] testsuites/.../*: Address unused parameter warnings These files are included or compiled multiple times. Any warning in these results in many warning instances. Found with GCC's warning -Wunused-paramter. --- testsuites/fstests/support/fstest_support.c | 2 ++ testsuites/libtests/dl06/initimpl.h | 2 ++ testsuites/libtests/stackchk/init.c | 2 ++ testsuites/libtests/stackchk/task1.c | 2 ++ .../termios03/termios_testdriver_polled.c | 22 ++++++++++++ .../termios04/termios_testdriver_impl.h | 36 +++++++++++++++++++ testsuites/libtests/termios10/termios10impl.h | 2 ++ .../psxtests/psxfatal_support/psxfatalimpl.h | 2 ++ .../psxtests/psxsignal03/psxsignal0ximpl.h | 6 ++++ .../psxtmtests/psxtmcond08/psxtmcond08impl.h | 9 +++-- testsuites/sptests/sp27/sp27impl.h | 6 ++++ testsuites/sptests/sp52/sp52impl.h | 5 +++ testsuites/sptests/sp65/sp65impl.h | 2 ++ .../sptests/spfatal_support/spfatalimpl.h | 2 ++ .../support/src/tmtests_empty_function.c | 2 ++ testsuites/tmtests/tm02/tm02impl.h | 8 +++++ testsuites/tmtests/tm03/tm03impl.h | 8 +++++ 17 files changed, 116 insertions(+), 2 deletions(-) diff --git a/testsuites/fstests/support/fstest_support.c b/testsuites/fstests/support/fstest_support.c index 0f4b4377a0..38f8b2f7ce 100644 --- a/testsuites/fstests/support/fstest_support.c +++ b/testsuites/fstests/support/fstest_support.c @@ -83,6 +83,8 @@ static void break_out_of_chroot(void) rtems_task Init( rtems_task_argument ignored) { + (void) ignored; + int rc=0; rtems_test_begin(rtems_test_name, rtems_test_state); diff --git a/testsuites/libtests/dl06/initimpl.h b/testsuites/libtests/dl06/initimpl.h index 0d3987983d..ee51335e3a 100644 --- a/testsuites/libtests/dl06/initimpl.h +++ b/testsuites/libtests/dl06/initimpl.h @@ -66,6 +66,8 @@ static int test(void) static void Init(rtems_task_argument arg) { + (void) arg; + int te; TEST_BEGIN(); diff --git a/testsuites/libtests/stackchk/init.c b/testsuites/libtests/stackchk/init.c index 9da4dc52a7..cbb8e8b772 100644 --- a/testsuites/libtests/stackchk/init.c +++ b/testsuites/libtests/stackchk/init.c @@ -44,6 +44,8 @@ rtems_task Init( rtems_task_argument argument ) { + (void) argument; + rtems_time_of_day time; rtems_status_code status; diff --git a/testsuites/libtests/stackchk/task1.c b/testsuites/libtests/stackchk/task1.c index 8c495c3f69..27587e8165 100644 --- a/testsuites/libtests/stackchk/task1.c +++ b/testsuites/libtests/stackchk/task1.c @@ -40,6 +40,8 @@ rtems_task Task_1_through_3( rtems_task_argument argument ) { + (void) argument; + rtems_id tid; rtems_time_of_day time; rtems_status_code status; diff --git a/testsuites/libtests/termios03/termios_testdriver_polled.c b/testsuites/libtests/termios03/termios_testdriver_polled.c index 8daf8d6685..e4c57d7242 100644 --- a/testsuites/libtests/termios03/termios_testdriver_polled.c +++ b/testsuites/libtests/termios03/termios_testdriver_polled.c @@ -85,6 +85,8 @@ void termios_test_driver_set_rx( int termios_test_driver_inbyte_nonblocking( int port ) { + (void) port; + if ( Rx_FirstTime == true ) { Rx_FirstTime = false; return -1; @@ -99,6 +101,8 @@ void termios_test_driver_outbyte_polled( char ch ) { + (void) port; + Tx_Buffer[Tx_Index++] = (uint8_t) ch; } @@ -122,6 +126,9 @@ int termios_test_driver_set_attributes( const struct termios *t ) { + (void) minor; + (void) t; + return 0; } @@ -134,6 +141,9 @@ rtems_device_driver termios_test_driver_initialize( void *arg ) { + (void) minor; + (void) arg; + rtems_termios_initialize(); /* @@ -179,6 +189,9 @@ rtems_device_driver termios_test_driver_close( void * arg ) { + (void) major; + (void) minor; + return rtems_termios_close (arg); } @@ -188,6 +201,9 @@ rtems_device_driver termios_test_driver_read( void * arg ) { + (void) major; + (void) minor; + return rtems_termios_read (arg); } @@ -197,6 +213,9 @@ rtems_device_driver termios_test_driver_write( void * arg ) { + (void) major; + (void) minor; + return rtems_termios_write (arg); } @@ -206,5 +225,8 @@ rtems_device_driver termios_test_driver_control( void * arg ) { + (void) major; + (void) minor; + return rtems_termios_ioctl (arg); } diff --git a/testsuites/libtests/termios04/termios_testdriver_impl.h b/testsuites/libtests/termios04/termios_testdriver_impl.h index 740f9e0778..c8c8a88017 100644 --- a/testsuites/libtests/termios04/termios_testdriver_impl.h +++ b/testsuites/libtests/termios04/termios_testdriver_impl.h @@ -99,6 +99,8 @@ bool Rx_EnqueueNow = false; #if defined(TASK_DRIVEN) int termios_test_driver_inbyte_nonblocking( int port ) { + (void) port; + if ( Rx_FirstTime == true ) { Rx_FirstTime = false; return -1; @@ -114,6 +116,9 @@ rtems_timer_service_routine Rx_ISR( void *ignored_address ) { + (void) ignored_id; + (void) ignored_address; + uint8_t ch; if ( Rx_Index >= Rx_Length ) @@ -133,6 +138,9 @@ rtems_timer_service_routine Tx_ISR( void *ignored_address ) { + (void) ignored_id; + (void) ignored_address; + rtems_termios_dequeue_characters (Ttyp, 1); (void) rtems_timer_fire_after( Tx_Timer, 10, Tx_ISR, NULL ); @@ -172,6 +180,8 @@ ssize_t termios_test_driver_write_helper( size_t len ) { + (void) port; + if (len > 0) { Tx_Buffer[Tx_Index++] = buf[0]; (void) rtems_timer_fire_after( Tx_Timer, 10, Tx_ISR, NULL ); @@ -188,6 +198,9 @@ int termios_test_driver_set_attributes( const struct termios *t ) { + (void) minor; + (void) t; + return 0; } @@ -200,6 +213,9 @@ rtems_device_driver termios_test_driver_initialize( void *arg ) { + (void) minor; + (void) arg; + rtems_termios_initialize(); /* @@ -212,6 +228,10 @@ rtems_device_driver termios_test_driver_initialize( static int first_open(int major, int minor, void *arg) { + (void) major; + (void) minor; + (void) arg; + rtems_status_code status; status = rtems_timer_create(rtems_build_name('T', 'M', 'R', 'X'), &Rx_Timer); @@ -227,6 +247,10 @@ static int first_open(int major, int minor, void *arg) static int last_close(int major, int minor, void *arg) { + (void) major; + (void) minor; + (void) arg; + rtems_status_code status; status = rtems_timer_cancel(Rx_Timer); @@ -294,6 +318,9 @@ rtems_device_driver termios_test_driver_close( void * arg ) { + (void) major; + (void) minor; + return rtems_termios_close (arg); } @@ -303,6 +330,9 @@ rtems_device_driver termios_test_driver_read( void * arg ) { + (void) major; + (void) minor; + return rtems_termios_read (arg); } @@ -312,6 +342,9 @@ rtems_device_driver termios_test_driver_write( void * arg ) { + (void) major; + (void) minor; + return rtems_termios_write (arg); } @@ -321,5 +354,8 @@ rtems_device_driver termios_test_driver_control( void * arg ) { + (void) major; + (void) minor; + return rtems_termios_ioctl (arg); } diff --git a/testsuites/libtests/termios10/termios10impl.h b/testsuites/libtests/termios10/termios10impl.h index c2981ff80f..ec40a9dfd3 100644 --- a/testsuites/libtests/termios10/termios10impl.h +++ b/testsuites/libtests/termios10/termios10impl.h @@ -136,6 +136,8 @@ static void test_read_for_signal( */ static void *POSIX_Init(void *argument) { + (void) argument; + int rc; TEST_BEGIN(); diff --git a/testsuites/psxtests/psxfatal_support/psxfatalimpl.h b/testsuites/psxtests/psxfatal_support/psxfatalimpl.h index 4ad3cbdd1a..9ea549d4e5 100644 --- a/testsuites/psxtests/psxfatal_support/psxfatalimpl.h +++ b/testsuites/psxtests/psxfatal_support/psxfatalimpl.h @@ -42,6 +42,8 @@ void *POSIX_Init( void *argument ) { + (void) argument; + print_test_begin_message(); force_error(); printk( "Fatal error (%s) NOT hit\n", FATAL_ERROR_DESCRIPTION ); diff --git a/testsuites/psxtests/psxsignal03/psxsignal0ximpl.h b/testsuites/psxtests/psxsignal03/psxsignal0ximpl.h index f727545c3f..30e1ba2841 100644 --- a/testsuites/psxtests/psxsignal03/psxsignal0ximpl.h +++ b/testsuites/psxtests/psxsignal03/psxsignal0ximpl.h @@ -85,6 +85,10 @@ void Signal_handler( void *arg ) { + (void) signo; + (void) info; + (void) arg; + Signal_occurred = true; Signal_thread = pthread_self(); } @@ -171,6 +175,8 @@ void *POSIX_Init( void *argument ) { + (void) argument; + int sc; pthread_t id; struct sigaction act; diff --git a/testsuites/psxtmtests/psxtmcond08/psxtmcond08impl.h b/testsuites/psxtmtests/psxtmcond08/psxtmcond08impl.h index 01bc063574..60a6e325f8 100644 --- a/testsuites/psxtmtests/psxtmcond08/psxtmcond08impl.h +++ b/testsuites/psxtmtests/psxtmcond08/psxtmcond08impl.h @@ -81,6 +81,8 @@ void *Low( void *argument ) { + (void) argument; + uint32_t end_time; end_time = benchmark_timer_read(); @@ -103,8 +105,9 @@ void *Middle( void *argument ) { - int rc; + (void) argument; + int rc; rc = pthread_mutex_lock(&MutexID); rtems_test_assert( rc == 0 ); @@ -170,6 +173,8 @@ void *POSIX_Init( void *argument ) { + (void) argument; + int i; int status; pthread_t threadId; @@ -226,4 +231,4 @@ void *POSIX_Init( #include /* end of file */ - \ No newline at end of file + diff --git a/testsuites/sptests/sp27/sp27impl.h b/testsuites/sptests/sp27/sp27impl.h index 0b68ed0cd9..734db4a3ec 100644 --- a/testsuites/sptests/sp27/sp27impl.h +++ b/testsuites/sptests/sp27/sp27impl.h @@ -67,6 +67,8 @@ rtems_task subtask( rtems_task_argument arg ) { + (void) arg; + rtems_status_code sc; for (;;) { @@ -83,6 +85,8 @@ void starttask( int arg ) { + (void) arg; + rtems_id tid; rtems_status_code sc; rtems_task_priority priority; @@ -136,6 +140,8 @@ rtems_task Init( rtems_task_argument ignored ) { + (void) ignored; + TEST_BEGIN(); puts( "Testing " TEST_SEMAPHORE_TYPE " semaphore flush" ); doTest(); diff --git a/testsuites/sptests/sp52/sp52impl.h b/testsuites/sptests/sp52/sp52impl.h index cf73ced4d9..c4fb18e79e 100644 --- a/testsuites/sptests/sp52/sp52impl.h +++ b/testsuites/sptests/sp52/sp52impl.h @@ -70,6 +70,9 @@ static rtems_timer_service_routine TIMER_service_routine( void *user_data ) { + (void) ignored_id; + (void) user_data; + rtems_status_code status; rtems_time_of_day now; @@ -86,6 +89,8 @@ static rtems_task Init( rtems_task_argument argument ) { + (void) argument; + rtems_status_code status; rtems_id timer_id; rtems_name timer_name; diff --git a/testsuites/sptests/sp65/sp65impl.h b/testsuites/sptests/sp65/sp65impl.h index 03e1ba561f..0900fa99fb 100644 --- a/testsuites/sptests/sp65/sp65impl.h +++ b/testsuites/sptests/sp65/sp65impl.h @@ -62,6 +62,8 @@ rtems_task Init( rtems_task_argument ignored ) { + (void) ignored; + int status; rtems_id Mutex_id, Task_id; diff --git a/testsuites/sptests/spfatal_support/spfatalimpl.h b/testsuites/sptests/spfatal_support/spfatalimpl.h index 6f0c9139e3..bccf123172 100644 --- a/testsuites/sptests/spfatal_support/spfatalimpl.h +++ b/testsuites/sptests/spfatal_support/spfatalimpl.h @@ -48,6 +48,8 @@ rtems_task Init( rtems_task_argument argument ) { + (void) argument; + print_test_begin_message(); force_error(); printk( "Fatal error (%s) NOT hit\n", FATAL_ERROR_DESCRIPTION ); diff --git a/testsuites/support/src/tmtests_empty_function.c b/testsuites/support/src/tmtests_empty_function.c index e1834d2468..5a65361cb9 100644 --- a/testsuites/support/src/tmtests_empty_function.c +++ b/testsuites/support/src/tmtests_empty_function.c @@ -47,4 +47,6 @@ void benchmark_timer_empty_operation( void *argument ) { + (void) iteration; + (void) argument; } diff --git a/testsuites/tmtests/tm02/tm02impl.h b/testsuites/tmtests/tm02/tm02impl.h index 0151c1f369..3006a8483c 100644 --- a/testsuites/tmtests/tm02/tm02impl.h +++ b/testsuites/tmtests/tm02/tm02impl.h @@ -87,6 +87,8 @@ rtems_task Init( rtems_task_argument argument ) { + (void) argument; + rtems_status_code status; Print_Warning(); @@ -168,6 +170,8 @@ rtems_task High_task( rtems_task_argument argument ) { + (void) argument; + /* start blocking rtems_semaphore_obtain time */ benchmark_timer_initialize(); @@ -182,6 +186,8 @@ rtems_task Middle_tasks( rtems_task_argument argument ) { + (void) argument; + (void) rtems_semaphore_obtain( Semaphore_id, RTEMS_DEFAULT_OPTIONS, @@ -193,6 +199,8 @@ rtems_task Low_task( rtems_task_argument argument ) { + (void) argument; + end_time = benchmark_timer_read(); put_time( diff --git a/testsuites/tmtests/tm03/tm03impl.h b/testsuites/tmtests/tm03/tm03impl.h index e1781969b6..5385aa7025 100644 --- a/testsuites/tmtests/tm03/tm03impl.h +++ b/testsuites/tmtests/tm03/tm03impl.h @@ -83,6 +83,8 @@ rtems_task Init( rtems_task_argument argument ) { + (void) argument; + rtems_status_code status; rtems_id task_id; @@ -109,6 +111,8 @@ rtems_task test_init( rtems_task_argument argument ) { + (void) argument; + rtems_status_code status; int index; rtems_id task_id; @@ -165,6 +169,8 @@ rtems_task Middle_tasks( rtems_task_argument argument ) { + (void) argument; + (void) rtems_semaphore_obtain( Semaphore_id, RTEMS_DEFAULT_OPTIONS, @@ -178,6 +184,8 @@ rtems_task High_task( rtems_task_argument argument ) { + (void) argument; + (void) rtems_semaphore_obtain( Semaphore_id, RTEMS_DEFAULT_OPTIONS,