diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-05-09 21:24:06 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-05-09 21:24:06 +0000 |
commit | 1055ce20fce7730cd46bb41230252cbaf1acce83 (patch) | |
tree | f1bafa58b57cfe61d7acf5947f4d1fb337e72c9e /testsuites | |
parent | 2009-05-09 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-1055ce20fce7730cd46bb41230252cbaf1acce83.tar.bz2 |
Fix most warnings.
Diffstat (limited to 'testsuites')
28 files changed, 150 insertions, 129 deletions
diff --git a/testsuites/tmtests/tm01/task1.c b/testsuites/tmtests/tm01/task1.c index 9ff286b246..8a02990f3a 100644 --- a/testsuites/tmtests/tm01/task1.c +++ b/testsuites/tmtests/tm01/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -32,7 +32,7 @@ rtems_task Init( status = rtems_task_create( Task_name[ 1 ], - (RTEMS_MAXIMUM_PRIORITY / 2) + 1, + (RTEMS_MAXIMUM_PRIORITY / 2u) + 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, diff --git a/testsuites/tmtests/tm02/task1.c b/testsuites/tmtests/tm02/task1.c index 618aea8a14..297c58d3ec 100644 --- a/testsuites/tmtests/tm02/task1.c +++ b/testsuites/tmtests/tm02/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -30,7 +30,7 @@ rtems_task Low_task( int operation_count = OPERATION_COUNT; -void test_init(); +void test_init(void); rtems_task Init( rtems_task_argument argument @@ -48,10 +48,10 @@ rtems_task Init( directive_failed( status, "rtems_task_delete" ); } -void test_init() +void test_init(void) { rtems_status_code status; - uint32_t index; + int index; rtems_task_priority priority; priority = 2; @@ -71,8 +71,8 @@ void test_init() status = rtems_task_start( High_id, High_task, 0 ); directive_failed( status, "rtems_task_start of high task" ); - if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 ) - operation_count = RTEMS_MAXIMUM_PRIORITY - 2; + if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2u ) + operation_count = (int) (RTEMS_MAXIMUM_PRIORITY - 2u); for ( index=2 ; index < operation_count ; index++ ) { status = rtems_task_create( rtems_build_name( 'M', 'I', 'D', ' ' ), diff --git a/testsuites/tmtests/tm03/task1.c b/testsuites/tmtests/tm03/task1.c index bdd52cb403..3733068abe 100644 --- a/testsuites/tmtests/tm03/task1.c +++ b/testsuites/tmtests/tm03/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -39,7 +39,7 @@ rtems_task Init( puts( "\n\n*** TIME TEST 3 ***" ); status = rtems_task_create( rtems_build_name( 'T', 'A', '1', ' ' ), - RTEMS_MAXIMUM_PRIORITY - 1, + RTEMS_MAXIMUM_PRIORITY - 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -63,7 +63,7 @@ rtems_task test_init( rtems_id task_id; rtems_task_priority priority; - priority = RTEMS_MAXIMUM_PRIORITY - 2; + priority = RTEMS_MAXIMUM_PRIORITY - 2u; status = rtems_semaphore_create( rtems_build_name( 'S', 'M', '1', '\0'), @@ -74,8 +74,8 @@ rtems_task test_init( ); directive_failed( status, "rtems_semaphore_create of SM1" ); - if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 ) - operation_count = RTEMS_MAXIMUM_PRIORITY - 2; + if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2u ) + operation_count = (int) (RTEMS_MAXIMUM_PRIORITY - 2u); for ( index = 2 ; index < operation_count ; index ++ ) { rtems_task_create( rtems_build_name( 'M', 'I', 'D', ' ' ), diff --git a/testsuites/tmtests/tm04/task1.c b/testsuites/tmtests/tm04/task1.c index f60246270e..ba3477335f 100644 --- a/testsuites/tmtests/tm04/task1.c +++ b/testsuites/tmtests/tm04/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -14,7 +14,7 @@ rtems_id Semaphore_id; rtems_id Task_id[OPERATION_COUNT+1]; -uint32_t task_count; +uint32_t task_count; rtems_id Highest_id; rtems_task Low_tasks( @@ -25,11 +25,15 @@ rtems_task High_task( rtems_task_argument argument ); +rtems_task Highest_task( + rtems_task_argument argument +); + rtems_task Restart_task( rtems_task_argument argument ); -void test_init(); +void test_init(void); rtems_task Init( rtems_task_argument argument @@ -47,10 +51,10 @@ rtems_task Init( directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); } -void test_init() +void test_init(void) { rtems_status_code status; - uint32_t index; + int index; task_count = OPERATION_COUNT; @@ -101,7 +105,7 @@ rtems_task Highest_task( status = rtems_task_set_priority( RTEMS_CURRENT_PRIORITY, - RTEMS_MAXIMUM_PRIORITY - 1, + RTEMS_MAXIMUM_PRIORITY - 1u, &old_priority ); directive_failed( status, "rtems_task_set_priority" ); @@ -214,7 +218,7 @@ rtems_task High_task( for ( index=1 ; index <= OPERATION_COUNT ; index++ ) { status = rtems_task_create( name, - RTEMS_MAXIMUM_PRIORITY - 4, + RTEMS_MAXIMUM_PRIORITY - 4u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_NO_PREEMPT, RTEMS_DEFAULT_ATTRIBUTES, @@ -261,7 +265,7 @@ rtems_task High_task( for ( index=1 ; index <= OPERATION_COUNT ; index++ ) { status = rtems_task_create( name, - RTEMS_MAXIMUM_PRIORITY - 4, + RTEMS_MAXIMUM_PRIORITY - 4u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, diff --git a/testsuites/tmtests/tm06/task1.c b/testsuites/tmtests/tm06/task1.c index c8aa71e138..1b237de342 100644 --- a/testsuites/tmtests/tm06/task1.c +++ b/testsuites/tmtests/tm06/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -45,13 +45,13 @@ rtems_task Init( void test_init( void ) { rtems_status_code status; - rtems_id id; + rtems_id id; Task_restarted = OPERATION_COUNT; status = rtems_task_create( rtems_build_name( 'T', 'I', 'M', 'E' ), - (RTEMS_MAXIMUM_PRIORITY / 2) + 1, + (RTEMS_MAXIMUM_PRIORITY / 2u) + 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -96,7 +96,7 @@ rtems_task Task_1( for ( index=1 ; index <= OPERATION_COUNT ; index++ ) { status = rtems_task_create( rtems_build_name( 'T', 'I', 'M', 'E' ), - RTEMS_MAXIMUM_PRIORITY - 1, + RTEMS_MAXIMUM_PRIORITY - 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, diff --git a/testsuites/tmtests/tm07/task1.c b/testsuites/tmtests/tm07/task1.c index a776e5ad24..dacf28033e 100644 --- a/testsuites/tmtests/tm07/task1.c +++ b/testsuites/tmtests/tm07/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -26,7 +26,7 @@ rtems_task Low_task( rtems_task_argument argument ); -void test_init(); +void test_init(void); int operation_count = OPERATION_COUNT; @@ -46,17 +46,17 @@ rtems_task Init( directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); } -void test_init() +void test_init(void) { rtems_status_code status; rtems_task_priority priority; rtems_task_entry task_entry; - uint32_t index; + int index; - priority = RTEMS_MAXIMUM_PRIORITY - 1; + priority = RTEMS_MAXIMUM_PRIORITY - 1u; - if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 ) - operation_count = RTEMS_MAXIMUM_PRIORITY - 2; + if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2u ) + operation_count = (int) (RTEMS_MAXIMUM_PRIORITY - 2u); for( index=0 ; index <= operation_count ; index++ ) { status = rtems_task_create( diff --git a/testsuites/tmtests/tm08/task1.c b/testsuites/tmtests/tm08/task1.c index 70a8f75bbc..7e3f149bd9 100644 --- a/testsuites/tmtests/tm08/task1.c +++ b/testsuites/tmtests/tm08/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -20,7 +20,7 @@ rtems_task test_task( rtems_task test_task1( rtems_task_argument argument ); -void test_init(); +void test_init(void); rtems_task Init( rtems_task_argument argument @@ -38,13 +38,13 @@ rtems_task Init( directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); } -void test_init() +void test_init(void) { rtems_status_code status; status = rtems_task_create( 1, - (RTEMS_MAXIMUM_PRIORITY / 2) + 1, + (RTEMS_MAXIMUM_PRIORITY / 2u) + 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -57,7 +57,7 @@ void test_init() status = rtems_task_create( 1, - RTEMS_MAXIMUM_PRIORITY - 1, + RTEMS_MAXIMUM_PRIORITY - 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -106,7 +106,7 @@ rtems_task test_task( for ( index=1 ; index <= OPERATION_COUNT ; index++ ) (void) rtems_task_set_priority( Test_task_id, - RTEMS_MAXIMUM_PRIORITY - 2, + RTEMS_MAXIMUM_PRIORITY - 2u, &old_priority ); diff --git a/testsuites/tmtests/tm09/task1.c b/testsuites/tmtests/tm09/task1.c index 8ead82646e..c5f0170c02 100644 --- a/testsuites/tmtests/tm09/task1.c +++ b/testsuites/tmtests/tm09/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -17,7 +17,7 @@ rtems_id Queue_id; rtems_task Test_task( rtems_task_argument argument ); -void queue_test(); +void queue_test(void); rtems_task Init( rtems_task_argument argument @@ -31,7 +31,7 @@ rtems_task Init( status = rtems_task_create( 1, - (RTEMS_MAXIMUM_PRIORITY / 2) + 1, + (RTEMS_MAXIMUM_PRIORITY / 2u) + 1u, RTEMS_MINIMUM_STACK_SIZE * 2, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -86,7 +86,7 @@ rtems_task Test_task ( rtems_test_exit( 0 ); } -void queue_test() +void queue_test(void) { uint32_t send_loop_time; uint32_t urgent_loop_time; diff --git a/testsuites/tmtests/tm10/task1.c b/testsuites/tmtests/tm10/task1.c index ae41ff6525..b3e1665033 100644 --- a/testsuites/tmtests/tm10/task1.c +++ b/testsuites/tmtests/tm10/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -27,7 +27,7 @@ rtems_task Low_task( rtems_task_argument argument ); -void test_init(); +void test_init(void); int operation_count = OPERATION_COUNT; @@ -84,7 +84,7 @@ void test_init() status = rtems_message_queue_create( 1, - operation_count, + (uint32_t)operation_count, 16, RTEMS_DEFAULT_ATTRIBUTES, &Queue_id diff --git a/testsuites/tmtests/tm11/task1.c b/testsuites/tmtests/tm11/task1.c index 65e353ac98..8a3ba017b5 100644 --- a/testsuites/tmtests/tm11/task1.c +++ b/testsuites/tmtests/tm11/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -43,7 +43,7 @@ void Init( status = rtems_task_create( 1, - RTEMS_MAXIMUM_PRIORITY - 1, + RTEMS_MAXIMUM_PRIORITY - 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -64,7 +64,7 @@ rtems_task test_init( rtems_task_argument argument ) { - uint32_t index; + int index; rtems_task_entry task_entry; rtems_task_priority priority; rtems_id task_id; @@ -84,10 +84,10 @@ rtems_task test_init( ); directive_failed( status, "rtems_message_queue_create" ); - priority = RTEMS_MAXIMUM_PRIORITY - 2; + priority = RTEMS_MAXIMUM_PRIORITY - 2u; - if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 ) - operation_count = RTEMS_MAXIMUM_PRIORITY - 2; + if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2u ) + operation_count = RTEMS_MAXIMUM_PRIORITY - 2u; for( index = 0; index < operation_count ; index++ ) { status = rtems_task_create( rtems_build_name( 'T', 'I', 'M', 'E' ), diff --git a/testsuites/tmtests/tm12/task1.c b/testsuites/tmtests/tm12/task1.c index a79cefdfe5..be8910c356 100644 --- a/testsuites/tmtests/tm12/task1.c +++ b/testsuites/tmtests/tm12/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -45,7 +45,7 @@ rtems_task Init( status = rtems_task_create( 1, - RTEMS_MAXIMUM_PRIORITY - 1, + RTEMS_MAXIMUM_PRIORITY - 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -64,7 +64,7 @@ rtems_task test_init( rtems_task_argument argument ) { - uint32_t index; + int index; rtems_task_entry task_entry; rtems_task_priority priority; rtems_id task_id; @@ -73,14 +73,14 @@ rtems_task test_init( status = rtems_message_queue_create( rtems_build_name( 'M', 'Q', '1', ' ' ), - operation_count, + (uint32_t) operation_count, MESSAGE_SIZE, RTEMS_DEFAULT_ATTRIBUTES, &Queue_id ); directive_failed( status, "rtems_message_queue_create" ); - priority = RTEMS_MAXIMUM_PRIORITY - 1; + priority = RTEMS_MAXIMUM_PRIORITY - 1u; if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 ) operation_count = RTEMS_MAXIMUM_PRIORITY - 2; @@ -98,8 +98,8 @@ rtems_task test_init( priority--; - if ( index==operation_count-1 ) task_entry = High_task; - else task_entry = Low_tasks; + if ( index == operation_count-1 ) task_entry = High_task; + else task_entry = Low_tasks; status = rtems_task_start( task_id, task_entry, 0 ); directive_failed( status, "rtems_task_start LOOP" ); @@ -110,7 +110,7 @@ rtems_task High_task( rtems_task_argument argument ) { - uint32_t index; + int index; benchmark_timer_initialize(); for ( index=1 ; index < operation_count ; index++ ) diff --git a/testsuites/tmtests/tm13/task1.c b/testsuites/tmtests/tm13/task1.c index a687d8004e..a4c4c6857f 100644 --- a/testsuites/tmtests/tm13/task1.c +++ b/testsuites/tmtests/tm13/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -45,7 +45,7 @@ void Init( status = rtems_task_create( 1, - RTEMS_MAXIMUM_PRIORITY - 1, + RTEMS_MAXIMUM_PRIORITY - 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -64,7 +64,7 @@ rtems_task test_init( rtems_task_argument argument ) { - uint32_t index; + int index; rtems_task_entry task_entry; rtems_task_priority priority; rtems_id task_id; @@ -84,10 +84,10 @@ rtems_task test_init( ); directive_failed( status, "rtems_message_queue_create" ); - priority = RTEMS_MAXIMUM_PRIORITY - 2; + priority = RTEMS_MAXIMUM_PRIORITY - 2u; - if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 ) - operation_count = RTEMS_MAXIMUM_PRIORITY - 2; + if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2u ) + operation_count = (int)(RTEMS_MAXIMUM_PRIORITY - 2u); for( index = 0; index < operation_count ; index++ ) { status = rtems_task_create( diff --git a/testsuites/tmtests/tm14/task1.c b/testsuites/tmtests/tm14/task1.c index 40260d1705..6cb864008a 100644 --- a/testsuites/tmtests/tm14/task1.c +++ b/testsuites/tmtests/tm14/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -45,7 +45,7 @@ rtems_task Init( status = rtems_task_create( 1, - RTEMS_MAXIMUM_PRIORITY - 1, + RTEMS_MAXIMUM_PRIORITY - 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -64,13 +64,12 @@ rtems_task test_init( rtems_task_argument argument ) { - uint32_t index; + int index; rtems_task_entry task_entry; rtems_task_priority priority; rtems_id task_id; rtems_status_code status; - status = rtems_message_queue_create( rtems_build_name( 'M', 'Q', '1', ' ' ), OPERATION_COUNT, @@ -80,9 +79,9 @@ rtems_task test_init( ); directive_failed( status, "rtems_message_queue_create" ); - priority = RTEMS_MAXIMUM_PRIORITY - 2; - if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 ) - operation_count = RTEMS_MAXIMUM_PRIORITY - 2; + priority = RTEMS_MAXIMUM_PRIORITY - 2u; + if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2u ) + operation_count = (int) (RTEMS_MAXIMUM_PRIORITY - 2u); for( index = 0; index < operation_count ; index++ ) { status = rtems_task_create( @@ -109,7 +108,7 @@ rtems_task High_task( rtems_task_argument argument ) { - uint32_t index; + int index; benchmark_timer_initialize(); for ( index=1 ; index < operation_count ; index++ ) diff --git a/testsuites/tmtests/tm15/task1.c b/testsuites/tmtests/tm15/task1.c index d391b02072..5f9ddbcdd1 100644 --- a/testsuites/tmtests/tm15/task1.c +++ b/testsuites/tmtests/tm15/task1.c @@ -1,6 +1,5 @@ /* - * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -23,7 +22,7 @@ rtems_task Low_task( rtems_task_argument argument ); -void test_init(); +void test_init(void); rtems_task Init( rtems_task_argument argument @@ -41,7 +40,7 @@ rtems_task Init( directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); } -void test_init() +void test_init(void) { rtems_id id; uint32_t index; diff --git a/testsuites/tmtests/tm16/task1.c b/testsuites/tmtests/tm16/task1.c index 2f1cc1981b..021fa67f58 100644 --- a/testsuites/tmtests/tm16/task1.c +++ b/testsuites/tmtests/tm16/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -41,7 +41,7 @@ rtems_task Init( status = rtems_task_create( rtems_build_name( 'T', 'E', 'S', 'T' ), - RTEMS_MAXIMUM_PRIORITY - 1, + RTEMS_MAXIMUM_PRIORITY - 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -62,7 +62,7 @@ rtems_task test_init( { rtems_task_priority priority; rtems_status_code status; - uint32_t index; + int index; rtems_task_entry task_entry; /* As each task is started, it preempts this task and @@ -70,9 +70,9 @@ rtems_task test_init( * this loop all created tasks are blocked. */ - priority = RTEMS_MAXIMUM_PRIORITY - 2; - if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 ) - operation_count = RTEMS_MAXIMUM_PRIORITY - 2; + priority = RTEMS_MAXIMUM_PRIORITY - 2u; + if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2u ) + operation_count = (int) (RTEMS_MAXIMUM_PRIORITY - 2u); for( index = 0 ; index < operation_count ; index++ ) { status = rtems_task_create( @@ -140,8 +140,8 @@ rtems_task High_task( put_time( "rtems_event_send: task readied -- preempts caller", end_time, - operation_count - 1, - 0, + operation_count - 1u, + 0u, CALLING_OVERHEAD_EVENT_SEND ); diff --git a/testsuites/tmtests/tm17/task1.c b/testsuites/tmtests/tm17/task1.c index 028ce4e7b8..549606c9dd 100644 --- a/testsuites/tmtests/tm17/task1.c +++ b/testsuites/tmtests/tm17/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -34,16 +34,16 @@ rtems_task Init( ) { rtems_task_entry task_entry; - uint32_t index; + int index; rtems_status_code status; Print_Warning(); puts( "\n\n*** TIME TEST 17 ***" ); - Task_priority = RTEMS_MAXIMUM_PRIORITY - 1; - if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2 ) - operation_count = RTEMS_MAXIMUM_PRIORITY - 2; + Task_priority = RTEMS_MAXIMUM_PRIORITY - 1u; + if ( OPERATION_COUNT > RTEMS_MAXIMUM_PRIORITY - 2u ) + operation_count = (int) (RTEMS_MAXIMUM_PRIORITY - 2u); for( index = 0; index < operation_count ; index++ ) { status = rtems_task_create( @@ -107,7 +107,7 @@ rtems_task Last_task( rtems_task_argument argument ) { - uint32_t index; + int index; end_time = benchmark_timer_read(); @@ -119,7 +119,7 @@ rtems_task Last_task( put_time( "rtems_task_set_priority: preempts caller", end_time, - operation_count - 1, + operation_count - 1u, overhead, CALLING_OVERHEAD_TASK_SET_PRIORITY ); diff --git a/testsuites/tmtests/tm18/task1.c b/testsuites/tmtests/tm18/task1.c index fb1b7d4533..395dcc6a45 100644 --- a/testsuites/tmtests/tm18/task1.c +++ b/testsuites/tmtests/tm18/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -15,6 +15,8 @@ uint32_t taskcount; rtems_task_priority taskpri; +void test_init(void); + rtems_task First_task( rtems_task_argument argument ); @@ -46,7 +48,7 @@ rtems_task Init( directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); } -void test_init() +void test_init(void) { rtems_id id; rtems_task_entry task_entry; @@ -56,7 +58,7 @@ void test_init() for ( index = 0 ; index <= OPERATION_COUNT ; index++ ) { status = rtems_task_create( rtems_build_name( 'T', 'I', 'M', 'E' ), - (RTEMS_MAXIMUM_PRIORITY / 2) + 1, + (RTEMS_MAXIMUM_PRIORITY / 2u) + 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, diff --git a/testsuites/tmtests/tm19/task1.c b/testsuites/tmtests/tm19/task1.c index 152327c7d1..0006020ee2 100644 --- a/testsuites/tmtests/tm19/task1.c +++ b/testsuites/tmtests/tm19/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -44,7 +44,7 @@ rtems_task Init( status = rtems_task_create( rtems_build_name( 'T', 'I', 'M', 'E' ), - (RTEMS_MAXIMUM_PRIORITY / 2) + 1, + (RTEMS_MAXIMUM_PRIORITY / 2u) + 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -70,7 +70,7 @@ rtems_task Init( status = rtems_task_create( rtems_build_name( 'T', 'I', 'M', 'E' ), - (RTEMS_MAXIMUM_PRIORITY / 2) - 1, + (RTEMS_MAXIMUM_PRIORITY / 2u) - 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -166,6 +166,11 @@ rtems_task Task_1( (void) rtems_signal_send( RTEMS_SELF, RTEMS_SIGNAL_1 ); } +/* avoid warnings for no prototype */ +rtems_asr Process_asr_for_task_2( + rtems_signal_set signals +); + rtems_asr Process_asr_for_task_2( rtems_signal_set signals ) diff --git a/testsuites/tmtests/tm20/task1.c b/testsuites/tmtests/tm20/task1.c index b1be3afd30..2eee195d8b 100644 --- a/testsuites/tmtests/tm20/task1.c +++ b/testsuites/tmtests/tm20/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -57,7 +57,7 @@ rtems_task Init( status = rtems_task_create( rtems_build_name( 'T', 'I', 'M', '1' ), - (RTEMS_MAXIMUM_PRIORITY / 2) + 1, + (RTEMS_MAXIMUM_PRIORITY / 2u) + 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -70,7 +70,7 @@ rtems_task Init( status = rtems_task_create( rtems_build_name( 'T', 'I', 'M', '2' ), - (RTEMS_MAXIMUM_PRIORITY / 2) + 2, + (RTEMS_MAXIMUM_PRIORITY / 2u) + 2u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -310,7 +310,7 @@ rtems_task Task_1( directive_failed( status, "rtems_task_mode" ); status = rtems_task_set_priority( - RTEMS_SELF, RTEMS_MAXIMUM_PRIORITY - 1, &previous_priority ); + RTEMS_SELF, RTEMS_MAXIMUM_PRIORITY - 1u, &previous_priority ); directive_failed( status, "rtems_task_set_priority" ); status = rtems_region_get_segment( diff --git a/testsuites/tmtests/tm21/task1.c b/testsuites/tmtests/tm21/task1.c index c6ffcb3d69..40b2397e49 100644 --- a/testsuites/tmtests/tm21/task1.c +++ b/testsuites/tmtests/tm21/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -32,7 +32,7 @@ rtems_task Init( status = rtems_task_create( rtems_build_name( 'T', 'I', 'M', 'E' ), - RTEMS_MAXIMUM_PRIORITY - 5, + RTEMS_MAXIMUM_PRIORITY - 5u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -60,7 +60,7 @@ rtems_task Task_1( for( index = 1 ; index <= OPERATION_COUNT ; index++ ) { status = rtems_task_create ( index, - RTEMS_MAXIMUM_PRIORITY - 1, + RTEMS_MAXIMUM_PRIORITY - 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, diff --git a/testsuites/tmtests/tm23/task1.c b/testsuites/tmtests/tm23/task1.c index 348b1a2aa7..7d802c1941 100644 --- a/testsuites/tmtests/tm23/task1.c +++ b/testsuites/tmtests/tm23/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -41,7 +41,7 @@ rtems_task Init( { rtems_task_priority priority; - uint32_t index; + int index; rtems_id id; rtems_task_entry task_entry; rtems_status_code status; @@ -294,7 +294,7 @@ rtems_task Low_task( "rtems_task_wake_when", end_time, operation_count, - 0, + 0, CALLING_OVERHEAD_TASK_WAKE_WHEN ); diff --git a/testsuites/tmtests/tm24/task1.c b/testsuites/tmtests/tm24/task1.c index 737bc822e5..a091411ee9 100644 --- a/testsuites/tmtests/tm24/task1.c +++ b/testsuites/tmtests/tm24/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -50,7 +50,7 @@ rtems_task Init( for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) { status = rtems_task_create( rtems_build_name( 'R', 'E', 'S', 'T' ), - (RTEMS_MAXIMUM_PRIORITY / 2) + 1, + (RTEMS_MAXIMUM_PRIORITY / 2u) + 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, diff --git a/testsuites/tmtests/tm25/task1.c b/testsuites/tmtests/tm25/task1.c index c853d97b95..b9ac0d2054 100644 --- a/testsuites/tmtests/tm25/task1.c +++ b/testsuites/tmtests/tm25/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -45,7 +45,7 @@ rtems_task Init( status = rtems_task_create( rtems_build_name( 'L', 'O', 'W', ' ' ), - RTEMS_MAXIMUM_PRIORITY - 1, + RTEMS_MAXIMUM_PRIORITY - 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, @@ -59,7 +59,7 @@ rtems_task Init( for ( index=1 ; index <= OPERATION_COUNT ; index++ ) { status = rtems_task_create( rtems_build_name( 'T', 'I', 'M', 'E' ), - (RTEMS_MAXIMUM_PRIORITY / 2) + 1, + (RTEMS_MAXIMUM_PRIORITY / 2u) + 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c index ec1193b90c..0ba36ea497 100644 --- a/testsuites/tmtests/tm26/task1.c +++ b/testsuites/tmtests/tm26/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -54,6 +54,10 @@ uint32_t thread_get_time; uint32_t semaphore_get_time; uint32_t thread_get_invalid_time; +rtems_task null_task( + rtems_task_argument argument +); + rtems_task High_task( rtems_task_argument argument ); @@ -94,7 +98,7 @@ rtems_task Init( puts( "\n\n*** TIME TEST 26 ***" ); -#define FP1_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 3) /* 201, */ +#define FP1_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 3u) /* 201, */ status = rtems_task_create( rtems_build_name( 'F', 'P', '1', ' ' ), FP1_PRIORITY, @@ -108,7 +112,7 @@ rtems_task Init( status = rtems_task_start( task_id, Floating_point_task_1, 0 ); directive_failed( status, "rtems_task_start of FP1" ); -#define FP2_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 2) /* 202, */ +#define FP2_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 2u) /* 202, */ status = rtems_task_create( rtems_build_name( 'F', 'P', '2', ' ' ), FP2_PRIORITY, @@ -122,7 +126,7 @@ rtems_task Init( status = rtems_task_start( task_id, Floating_point_task_2, 0 ); directive_failed( status, "rtems_task_start of FP2" ); -#define LOW_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 4) /* 200, */ +#define LOW_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 4u) /* 200, */ status = rtems_task_create( rtems_build_name( 'L', 'O', 'W', ' ' ), LOW_PRIORITY, @@ -136,7 +140,7 @@ rtems_task Init( status = rtems_task_start( task_id, Low_task, 0 ); directive_failed( status, "rtems_task_start of LOW" ); -#define MIDDLE_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 5) /* 128, */ +#define MIDDLE_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 5u) /* 128, */ status = rtems_task_create( rtems_build_name( 'M', 'I', 'D', ' ' ), MIDDLE_PRIORITY, @@ -175,7 +179,7 @@ rtems_task Init( for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) { status = rtems_task_create( rtems_build_name( 'N', 'U', 'L', 'L' ), - RTEMS_MAXIMUM_PRIORITY - 1, /* 254, */ + RTEMS_MAXIMUM_PRIORITY - 1u, /* 254, */ RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, diff --git a/testsuites/tmtests/tm27/task1.c b/testsuites/tmtests/tm27/task1.c index 9d63cf2fd5..9b5c8dd5dc 100644 --- a/testsuites/tmtests/tm27/task1.c +++ b/testsuites/tmtests/tm27/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -51,7 +51,7 @@ rtems_task Init( puts( "\n\n*** TIME TEST 27 ***" ); -#define LOW_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 1) +#define LOW_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 1u) status = rtems_task_create( rtems_build_name( 'T', 'A', '1', ' ' ), LOW_PRIORITY, diff --git a/testsuites/tmtests/tm28/task1.c b/testsuites/tmtests/tm28/task1.c index 166d67eb5b..1f93d122d0 100644 --- a/testsuites/tmtests/tm28/task1.c +++ b/testsuites/tmtests/tm28/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -33,7 +33,7 @@ rtems_task Init( status = rtems_task_create( rtems_build_name( 'T', 'I', 'M', 'E' ), - (RTEMS_MAXIMUM_PRIORITY / 2) + 1, + (RTEMS_MAXIMUM_PRIORITY / 2u) + 1u, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES, RTEMS_DEFAULT_ATTRIBUTES, diff --git a/testsuites/tmtests/tm29/task1.c b/testsuites/tmtests/tm29/task1.c index aff621dc9e..3b3a59ea1d 100644 --- a/testsuites/tmtests/tm29/task1.c +++ b/testsuites/tmtests/tm29/task1.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -116,7 +116,7 @@ rtems_task Init( CALLING_OVERHEAD_RATE_MONOTONIC_DELETE ); -#define LOOP_TASK_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2) + 1) +#define LOOP_TASK_PRIORITY ((RTEMS_MAXIMUM_PRIORITY / 2u) + 1u) for ( index=1 ; index <= OPERATION_COUNT ; index++ ) { status = rtems_task_create( rtems_build_name( 'T', 'E', 'S', 'T' ), @@ -132,7 +132,7 @@ rtems_task Init( directive_failed( status, "rtems_task_start LOOP" ); } -#define MIDDLE_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 2) +#define MIDDLE_PRIORITY (RTEMS_MAXIMUM_PRIORITY - 2u) status = rtems_task_create( rtems_build_name( 'L', 'O', 'W', ' ' ), MIDDLE_PRIORITY, diff --git a/testsuites/tmtests/tmoverhd/empty.c b/testsuites/tmtests/tmoverhd/empty.c index 1145490973..31f2ea32f4 100644 --- a/testsuites/tmtests/tmoverhd/empty.c +++ b/testsuites/tmtests/tmoverhd/empty.c @@ -12,6 +12,10 @@ #include "system.h" +rtems_task task_func(void); +void null_func(void); +rtems_status_code Empty_directive(void); + rtems_timer_service_routine Timer_handler( rtems_id argument ) @@ -30,11 +34,15 @@ rtems_asr Asr_handler( { } -rtems_task task_func() {} +rtems_task task_func(void) +{ +} -void null_func() {} +void null_func(void) +{ +} -rtems_status_code Empty_directive() +rtems_status_code Empty_directive(void) { return( RTEMS_SUCCESSFUL ); } |