mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-10 17:43:21 +00:00
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.
This commit is contained in:
@@ -83,6 +83,8 @@ static void break_out_of_chroot(void)
|
|||||||
rtems_task Init(
|
rtems_task Init(
|
||||||
rtems_task_argument ignored)
|
rtems_task_argument ignored)
|
||||||
{
|
{
|
||||||
|
(void) ignored;
|
||||||
|
|
||||||
int rc=0;
|
int rc=0;
|
||||||
|
|
||||||
rtems_test_begin(rtems_test_name, rtems_test_state);
|
rtems_test_begin(rtems_test_name, rtems_test_state);
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ static int test(void)
|
|||||||
|
|
||||||
static void Init(rtems_task_argument arg)
|
static void Init(rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
int te;
|
int te;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ rtems_task Init(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
rtems_time_of_day time;
|
rtems_time_of_day time;
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ rtems_task Task_1_through_3(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
rtems_id tid;
|
rtems_id tid;
|
||||||
rtems_time_of_day time;
|
rtems_time_of_day time;
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ void termios_test_driver_set_rx(
|
|||||||
|
|
||||||
int termios_test_driver_inbyte_nonblocking( int port )
|
int termios_test_driver_inbyte_nonblocking( int port )
|
||||||
{
|
{
|
||||||
|
(void) port;
|
||||||
|
|
||||||
if ( Rx_FirstTime == true ) {
|
if ( Rx_FirstTime == true ) {
|
||||||
Rx_FirstTime = false;
|
Rx_FirstTime = false;
|
||||||
return -1;
|
return -1;
|
||||||
@@ -99,6 +101,8 @@ void termios_test_driver_outbyte_polled(
|
|||||||
char ch
|
char ch
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) port;
|
||||||
|
|
||||||
Tx_Buffer[Tx_Index++] = (uint8_t) ch;
|
Tx_Buffer[Tx_Index++] = (uint8_t) ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,6 +126,9 @@ int termios_test_driver_set_attributes(
|
|||||||
const struct termios *t
|
const struct termios *t
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) minor;
|
||||||
|
(void) t;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,6 +141,9 @@ rtems_device_driver termios_test_driver_initialize(
|
|||||||
void *arg
|
void *arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) minor;
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
rtems_termios_initialize();
|
rtems_termios_initialize();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -179,6 +189,9 @@ rtems_device_driver termios_test_driver_close(
|
|||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) major;
|
||||||
|
(void) minor;
|
||||||
|
|
||||||
return rtems_termios_close (arg);
|
return rtems_termios_close (arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,6 +201,9 @@ rtems_device_driver termios_test_driver_read(
|
|||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) major;
|
||||||
|
(void) minor;
|
||||||
|
|
||||||
return rtems_termios_read (arg);
|
return rtems_termios_read (arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,6 +213,9 @@ rtems_device_driver termios_test_driver_write(
|
|||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) major;
|
||||||
|
(void) minor;
|
||||||
|
|
||||||
return rtems_termios_write (arg);
|
return rtems_termios_write (arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,5 +225,8 @@ rtems_device_driver termios_test_driver_control(
|
|||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) major;
|
||||||
|
(void) minor;
|
||||||
|
|
||||||
return rtems_termios_ioctl (arg);
|
return rtems_termios_ioctl (arg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ bool Rx_EnqueueNow = false;
|
|||||||
#if defined(TASK_DRIVEN)
|
#if defined(TASK_DRIVEN)
|
||||||
int termios_test_driver_inbyte_nonblocking( int port )
|
int termios_test_driver_inbyte_nonblocking( int port )
|
||||||
{
|
{
|
||||||
|
(void) port;
|
||||||
|
|
||||||
if ( Rx_FirstTime == true ) {
|
if ( Rx_FirstTime == true ) {
|
||||||
Rx_FirstTime = false;
|
Rx_FirstTime = false;
|
||||||
return -1;
|
return -1;
|
||||||
@@ -114,6 +116,9 @@ rtems_timer_service_routine Rx_ISR(
|
|||||||
void *ignored_address
|
void *ignored_address
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) ignored_id;
|
||||||
|
(void) ignored_address;
|
||||||
|
|
||||||
uint8_t ch;
|
uint8_t ch;
|
||||||
|
|
||||||
if ( Rx_Index >= Rx_Length )
|
if ( Rx_Index >= Rx_Length )
|
||||||
@@ -133,6 +138,9 @@ rtems_timer_service_routine Tx_ISR(
|
|||||||
void *ignored_address
|
void *ignored_address
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) ignored_id;
|
||||||
|
(void) ignored_address;
|
||||||
|
|
||||||
rtems_termios_dequeue_characters (Ttyp, 1);
|
rtems_termios_dequeue_characters (Ttyp, 1);
|
||||||
|
|
||||||
(void) rtems_timer_fire_after( Tx_Timer, 10, Tx_ISR, NULL );
|
(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
|
size_t len
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) port;
|
||||||
|
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
Tx_Buffer[Tx_Index++] = buf[0];
|
Tx_Buffer[Tx_Index++] = buf[0];
|
||||||
(void) rtems_timer_fire_after( Tx_Timer, 10, Tx_ISR, NULL );
|
(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
|
const struct termios *t
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) minor;
|
||||||
|
(void) t;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,6 +213,9 @@ rtems_device_driver termios_test_driver_initialize(
|
|||||||
void *arg
|
void *arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) minor;
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
rtems_termios_initialize();
|
rtems_termios_initialize();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -212,6 +228,10 @@ rtems_device_driver termios_test_driver_initialize(
|
|||||||
|
|
||||||
static int first_open(int major, int minor, void *arg)
|
static int first_open(int major, int minor, void *arg)
|
||||||
{
|
{
|
||||||
|
(void) major;
|
||||||
|
(void) minor;
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
|
|
||||||
status = rtems_timer_create(rtems_build_name('T', 'M', 'R', 'X'), &Rx_Timer);
|
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)
|
static int last_close(int major, int minor, void *arg)
|
||||||
{
|
{
|
||||||
|
(void) major;
|
||||||
|
(void) minor;
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
|
|
||||||
status = rtems_timer_cancel(Rx_Timer);
|
status = rtems_timer_cancel(Rx_Timer);
|
||||||
@@ -294,6 +318,9 @@ rtems_device_driver termios_test_driver_close(
|
|||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) major;
|
||||||
|
(void) minor;
|
||||||
|
|
||||||
return rtems_termios_close (arg);
|
return rtems_termios_close (arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,6 +330,9 @@ rtems_device_driver termios_test_driver_read(
|
|||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) major;
|
||||||
|
(void) minor;
|
||||||
|
|
||||||
return rtems_termios_read (arg);
|
return rtems_termios_read (arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,6 +342,9 @@ rtems_device_driver termios_test_driver_write(
|
|||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) major;
|
||||||
|
(void) minor;
|
||||||
|
|
||||||
return rtems_termios_write (arg);
|
return rtems_termios_write (arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,5 +354,8 @@ rtems_device_driver termios_test_driver_control(
|
|||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) major;
|
||||||
|
(void) minor;
|
||||||
|
|
||||||
return rtems_termios_ioctl (arg);
|
return rtems_termios_ioctl (arg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,6 +136,8 @@ static void test_read_for_signal(
|
|||||||
*/
|
*/
|
||||||
static void *POSIX_Init(void *argument)
|
static void *POSIX_Init(void *argument)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ void *POSIX_Init(
|
|||||||
void *argument
|
void *argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
print_test_begin_message();
|
print_test_begin_message();
|
||||||
force_error();
|
force_error();
|
||||||
printk( "Fatal error (%s) NOT hit\n", FATAL_ERROR_DESCRIPTION );
|
printk( "Fatal error (%s) NOT hit\n", FATAL_ERROR_DESCRIPTION );
|
||||||
|
|||||||
@@ -85,6 +85,10 @@ void Signal_handler(
|
|||||||
void *arg
|
void *arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) signo;
|
||||||
|
(void) info;
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
Signal_occurred = true;
|
Signal_occurred = true;
|
||||||
Signal_thread = pthread_self();
|
Signal_thread = pthread_self();
|
||||||
}
|
}
|
||||||
@@ -171,6 +175,8 @@ void *POSIX_Init(
|
|||||||
void *argument
|
void *argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
int sc;
|
int sc;
|
||||||
pthread_t id;
|
pthread_t id;
|
||||||
struct sigaction act;
|
struct sigaction act;
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ void *Low(
|
|||||||
void *argument
|
void *argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
uint32_t end_time;
|
uint32_t end_time;
|
||||||
|
|
||||||
end_time = benchmark_timer_read();
|
end_time = benchmark_timer_read();
|
||||||
@@ -103,8 +105,9 @@ void *Middle(
|
|||||||
void *argument
|
void *argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int rc;
|
(void) argument;
|
||||||
|
|
||||||
|
int rc;
|
||||||
|
|
||||||
rc = pthread_mutex_lock(&MutexID);
|
rc = pthread_mutex_lock(&MutexID);
|
||||||
rtems_test_assert( rc == 0 );
|
rtems_test_assert( rc == 0 );
|
||||||
@@ -170,6 +173,8 @@ void *POSIX_Init(
|
|||||||
void *argument
|
void *argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
int status;
|
int status;
|
||||||
pthread_t threadId;
|
pthread_t threadId;
|
||||||
@@ -226,4 +231,4 @@ void *POSIX_Init(
|
|||||||
|
|
||||||
#include <rtems/confdefs.h>
|
#include <rtems/confdefs.h>
|
||||||
/* end of file */
|
/* end of file */
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ rtems_task subtask(
|
|||||||
rtems_task_argument arg
|
rtems_task_argument arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
rtems_status_code sc;
|
rtems_status_code sc;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@@ -83,6 +85,8 @@ void starttask(
|
|||||||
int arg
|
int arg
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) arg;
|
||||||
|
|
||||||
rtems_id tid;
|
rtems_id tid;
|
||||||
rtems_status_code sc;
|
rtems_status_code sc;
|
||||||
rtems_task_priority priority;
|
rtems_task_priority priority;
|
||||||
@@ -136,6 +140,8 @@ rtems_task Init(
|
|||||||
rtems_task_argument ignored
|
rtems_task_argument ignored
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) ignored;
|
||||||
|
|
||||||
TEST_BEGIN();
|
TEST_BEGIN();
|
||||||
puts( "Testing " TEST_SEMAPHORE_TYPE " semaphore flush" );
|
puts( "Testing " TEST_SEMAPHORE_TYPE " semaphore flush" );
|
||||||
doTest();
|
doTest();
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ static rtems_timer_service_routine TIMER_service_routine(
|
|||||||
void *user_data
|
void *user_data
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) ignored_id;
|
||||||
|
(void) user_data;
|
||||||
|
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
rtems_time_of_day now;
|
rtems_time_of_day now;
|
||||||
|
|
||||||
@@ -86,6 +89,8 @@ static rtems_task Init(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
rtems_id timer_id;
|
rtems_id timer_id;
|
||||||
rtems_name timer_name;
|
rtems_name timer_name;
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ rtems_task Init(
|
|||||||
rtems_task_argument ignored
|
rtems_task_argument ignored
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) ignored;
|
||||||
|
|
||||||
int status;
|
int status;
|
||||||
rtems_id Mutex_id, Task_id;
|
rtems_id Mutex_id, Task_id;
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ rtems_task Init(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
print_test_begin_message();
|
print_test_begin_message();
|
||||||
force_error();
|
force_error();
|
||||||
printk( "Fatal error (%s) NOT hit\n", FATAL_ERROR_DESCRIPTION );
|
printk( "Fatal error (%s) NOT hit\n", FATAL_ERROR_DESCRIPTION );
|
||||||
|
|||||||
@@ -47,4 +47,6 @@ void benchmark_timer_empty_operation(
|
|||||||
void *argument
|
void *argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) iteration;
|
||||||
|
(void) argument;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,6 +87,8 @@ rtems_task Init(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
|
|
||||||
Print_Warning();
|
Print_Warning();
|
||||||
@@ -168,6 +170,8 @@ rtems_task High_task(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
/* start blocking rtems_semaphore_obtain time */
|
/* start blocking rtems_semaphore_obtain time */
|
||||||
benchmark_timer_initialize();
|
benchmark_timer_initialize();
|
||||||
|
|
||||||
@@ -182,6 +186,8 @@ rtems_task Middle_tasks(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
(void) rtems_semaphore_obtain(
|
(void) rtems_semaphore_obtain(
|
||||||
Semaphore_id,
|
Semaphore_id,
|
||||||
RTEMS_DEFAULT_OPTIONS,
|
RTEMS_DEFAULT_OPTIONS,
|
||||||
@@ -193,6 +199,8 @@ rtems_task Low_task(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
end_time = benchmark_timer_read();
|
end_time = benchmark_timer_read();
|
||||||
|
|
||||||
put_time(
|
put_time(
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ rtems_task Init(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
rtems_id task_id;
|
rtems_id task_id;
|
||||||
|
|
||||||
@@ -109,6 +111,8 @@ rtems_task test_init(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
rtems_status_code status;
|
rtems_status_code status;
|
||||||
int index;
|
int index;
|
||||||
rtems_id task_id;
|
rtems_id task_id;
|
||||||
@@ -165,6 +169,8 @@ rtems_task Middle_tasks(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
(void) rtems_semaphore_obtain(
|
(void) rtems_semaphore_obtain(
|
||||||
Semaphore_id,
|
Semaphore_id,
|
||||||
RTEMS_DEFAULT_OPTIONS,
|
RTEMS_DEFAULT_OPTIONS,
|
||||||
@@ -178,6 +184,8 @@ rtems_task High_task(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
(void) argument;
|
||||||
|
|
||||||
(void) rtems_semaphore_obtain(
|
(void) rtems_semaphore_obtain(
|
||||||
Semaphore_id,
|
Semaphore_id,
|
||||||
RTEMS_DEFAULT_OPTIONS,
|
RTEMS_DEFAULT_OPTIONS,
|
||||||
|
|||||||
Reference in New Issue
Block a user