From bfded728ec4c912f666df94867c118a1004b0165 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 4 Jan 2000 14:16:00 +0000 Subject: Fixed warnings. --- c/src/tests/itrontests/itrontask03/task1.c | 1 - c/src/tests/itrontests/itrontime01/init.c | 2 +- c/src/tests/libtests/termios/init.c | 2 ++ c/src/tests/psxtests/psx08/task1.c | 2 -- c/src/tests/psxtests/psxhdrs/proc03.c | 1 + c/src/tests/psxtests/psxhdrs/proc04.c | 1 + c/src/tests/psxtests/psxhdrs/proc05.c | 1 + c/src/tests/psxtests/psxhdrs/proc06.c | 1 + c/src/tests/psxtests/psxtime/test.c | 5 +++-- c/src/tests/sptests/sp26/init.c | 2 -- c/src/tests/sptests/sp26/system.h | 4 +--- c/src/tests/sptests/sp29/init.c | 1 - testsuites/itrontests/itrontask03/task1.c | 1 - testsuites/itrontests/itrontime01/init.c | 2 +- testsuites/libtests/termios/init.c | 2 ++ testsuites/psxtests/psx08/task1.c | 2 -- testsuites/psxtests/psxhdrs/proc03.c | 1 + testsuites/psxtests/psxhdrs/proc04.c | 1 + testsuites/psxtests/psxhdrs/proc05.c | 1 + testsuites/psxtests/psxhdrs/proc06.c | 1 + testsuites/psxtests/psxtime/test.c | 5 +++-- testsuites/sptests/sp26/init.c | 2 -- testsuites/sptests/sp26/system.h | 4 +--- testsuites/sptests/sp29/init.c | 1 - 24 files changed, 22 insertions(+), 24 deletions(-) diff --git a/c/src/tests/itrontests/itrontask03/task1.c b/c/src/tests/itrontests/itrontask03/task1.c index a085961c95..5247db714b 100644 --- a/c/src/tests/itrontests/itrontask03/task1.c +++ b/c/src/tests/itrontests/itrontask03/task1.c @@ -22,7 +22,6 @@ void Task_1() { ER status; - PRI previous_priority; /* * XXX - Change to itron routine. diff --git a/c/src/tests/itrontests/itrontime01/init.c b/c/src/tests/itrontests/itrontime01/init.c index 5bdadf1e66..2b0e625fdd 100644 --- a/c/src/tests/itrontests/itrontime01/init.c +++ b/c/src/tests/itrontests/itrontime01/init.c @@ -44,7 +44,7 @@ m_sec = r_time*1000; printf( "Time from 1970: %d\n", t_time ); printf( "Time between 1970 and 1985: %d\n", s_time ); printf( "Time from 1985: %d\n", r_time ); -printf("milliseconds: %f\n",m_sec); +printf("milliseconds: %ld\n",m_sec); return 0; } diff --git a/c/src/tests/libtests/termios/init.c b/c/src/tests/libtests/termios/init.c index 96c7e0934e..067b82ac07 100644 --- a/c/src/tests/libtests/termios/init.c +++ b/c/src/tests/libtests/termios/init.c @@ -41,6 +41,8 @@ rtems_task Init (rtems_task_argument argument); #include #include +int fileno( FILE *stream); /* beyond ANSI */ + /* * Test raw (ICANON=0) input */ diff --git a/c/src/tests/psxtests/psx08/task1.c b/c/src/tests/psxtests/psx08/task1.c index 5668f258d1..e1e37ee67e 100644 --- a/c/src/tests/psxtests/psx08/task1.c +++ b/c/src/tests/psxtests/psx08/task1.c @@ -25,8 +25,6 @@ void *Task_1( void *argument ) { - int status; - puts( "Task_1: exitting" ); return( &Task1_id ); diff --git a/c/src/tests/psxtests/psxhdrs/proc03.c b/c/src/tests/psxtests/psxhdrs/proc03.c index 1ec387a4d5..692e0f7da4 100644 --- a/c/src/tests/psxtests/psxhdrs/proc03.c +++ b/c/src/tests/psxtests/psxhdrs/proc03.c @@ -12,6 +12,7 @@ * $Id$ */ +#include #include void test( void ) diff --git a/c/src/tests/psxtests/psxhdrs/proc04.c b/c/src/tests/psxtests/psxhdrs/proc04.c index 2d72af7a0e..e1b51e7e6d 100644 --- a/c/src/tests/psxtests/psxhdrs/proc04.c +++ b/c/src/tests/psxtests/psxhdrs/proc04.c @@ -12,6 +12,7 @@ * $Id$ */ +#include #include void test( void ) diff --git a/c/src/tests/psxtests/psxhdrs/proc05.c b/c/src/tests/psxtests/psxhdrs/proc05.c index 524b6c27a4..a105f20e96 100644 --- a/c/src/tests/psxtests/psxhdrs/proc05.c +++ b/c/src/tests/psxtests/psxhdrs/proc05.c @@ -12,6 +12,7 @@ * $Id$ */ +#include #include void test( void ) diff --git a/c/src/tests/psxtests/psxhdrs/proc06.c b/c/src/tests/psxtests/psxhdrs/proc06.c index 63db1d0c75..7cbc0ed490 100644 --- a/c/src/tests/psxtests/psxhdrs/proc06.c +++ b/c/src/tests/psxtests/psxhdrs/proc06.c @@ -12,6 +12,7 @@ * $Id$ */ +#include #include void test( void ) diff --git a/c/src/tests/psxtests/psxtime/test.c b/c/src/tests/psxtests/psxtime/test.c index f62d242fa9..e21eb2da9e 100644 --- a/c/src/tests/psxtests/psxtime/test.c +++ b/c/src/tests/psxtests/psxtime/test.c @@ -26,7 +26,7 @@ /* * List of dates and times to test. */ -#define NUMBER_OF_DATES 7 +#define NUMBER_OF_DATES 8 rtems_time_of_day Dates[ NUMBER_OF_DATES ] = { /* YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, TICKS */ { 1988, 1, 1, 12, 45, 00, 0 }, @@ -67,7 +67,8 @@ void check_a_tod( /* now do the posix time gets */ result = gettimeofday( &tv, 0 ); assert( result == 0 ); - printf( "gettimeofday: %s", ctime( &tv.tv_sec ) ); + a_time_t = tv.tv_sec; /* ctime() takes a time_t */ + printf( "gettimeofday: %s", ctime( &a_time_t) ); a_time_t = time( 0 ); printf( "time: %s", ctime( &a_time_t ) ); diff --git a/c/src/tests/sptests/sp26/init.c b/c/src/tests/sptests/sp26/init.c index e382569a0f..7682ad0011 100644 --- a/c/src/tests/sptests/sp26/init.c +++ b/c/src/tests/sptests/sp26/init.c @@ -29,8 +29,6 @@ rtems_task Init( rtems_task_argument argument ) { - rtems_status_code status; - puts( "\n\n*** TEST 26 ***" ); task1(); diff --git a/c/src/tests/sptests/sp26/system.h b/c/src/tests/sptests/sp26/system.h index 05b90c4164..5f13e865b3 100644 --- a/c/src/tests/sptests/sp26/system.h +++ b/c/src/tests/sptests/sp26/system.h @@ -21,9 +21,7 @@ rtems_task Init( rtems_task_argument argument ); -rtems_task Task_1( - rtems_task_argument argument -); +void task1(void); /* configuration information */ diff --git a/c/src/tests/sptests/sp29/init.c b/c/src/tests/sptests/sp29/init.c index 032b1ac42e..a016ebca4b 100644 --- a/c/src/tests/sptests/sp29/init.c +++ b/c/src/tests/sptests/sp29/init.c @@ -25,7 +25,6 @@ rtems_interval ticksPerSecond; rtems_task subtask (rtems_task_argument arg) { - int i; rtems_status_code sc; rtems_id sem = (rtems_id)arg; diff --git a/testsuites/itrontests/itrontask03/task1.c b/testsuites/itrontests/itrontask03/task1.c index a085961c95..5247db714b 100644 --- a/testsuites/itrontests/itrontask03/task1.c +++ b/testsuites/itrontests/itrontask03/task1.c @@ -22,7 +22,6 @@ void Task_1() { ER status; - PRI previous_priority; /* * XXX - Change to itron routine. diff --git a/testsuites/itrontests/itrontime01/init.c b/testsuites/itrontests/itrontime01/init.c index 5bdadf1e66..2b0e625fdd 100644 --- a/testsuites/itrontests/itrontime01/init.c +++ b/testsuites/itrontests/itrontime01/init.c @@ -44,7 +44,7 @@ m_sec = r_time*1000; printf( "Time from 1970: %d\n", t_time ); printf( "Time between 1970 and 1985: %d\n", s_time ); printf( "Time from 1985: %d\n", r_time ); -printf("milliseconds: %f\n",m_sec); +printf("milliseconds: %ld\n",m_sec); return 0; } diff --git a/testsuites/libtests/termios/init.c b/testsuites/libtests/termios/init.c index 96c7e0934e..067b82ac07 100644 --- a/testsuites/libtests/termios/init.c +++ b/testsuites/libtests/termios/init.c @@ -41,6 +41,8 @@ rtems_task Init (rtems_task_argument argument); #include #include +int fileno( FILE *stream); /* beyond ANSI */ + /* * Test raw (ICANON=0) input */ diff --git a/testsuites/psxtests/psx08/task1.c b/testsuites/psxtests/psx08/task1.c index 5668f258d1..e1e37ee67e 100644 --- a/testsuites/psxtests/psx08/task1.c +++ b/testsuites/psxtests/psx08/task1.c @@ -25,8 +25,6 @@ void *Task_1( void *argument ) { - int status; - puts( "Task_1: exitting" ); return( &Task1_id ); diff --git a/testsuites/psxtests/psxhdrs/proc03.c b/testsuites/psxtests/psxhdrs/proc03.c index 1ec387a4d5..692e0f7da4 100644 --- a/testsuites/psxtests/psxhdrs/proc03.c +++ b/testsuites/psxtests/psxhdrs/proc03.c @@ -12,6 +12,7 @@ * $Id$ */ +#include #include void test( void ) diff --git a/testsuites/psxtests/psxhdrs/proc04.c b/testsuites/psxtests/psxhdrs/proc04.c index 2d72af7a0e..e1b51e7e6d 100644 --- a/testsuites/psxtests/psxhdrs/proc04.c +++ b/testsuites/psxtests/psxhdrs/proc04.c @@ -12,6 +12,7 @@ * $Id$ */ +#include #include void test( void ) diff --git a/testsuites/psxtests/psxhdrs/proc05.c b/testsuites/psxtests/psxhdrs/proc05.c index 524b6c27a4..a105f20e96 100644 --- a/testsuites/psxtests/psxhdrs/proc05.c +++ b/testsuites/psxtests/psxhdrs/proc05.c @@ -12,6 +12,7 @@ * $Id$ */ +#include #include void test( void ) diff --git a/testsuites/psxtests/psxhdrs/proc06.c b/testsuites/psxtests/psxhdrs/proc06.c index 63db1d0c75..7cbc0ed490 100644 --- a/testsuites/psxtests/psxhdrs/proc06.c +++ b/testsuites/psxtests/psxhdrs/proc06.c @@ -12,6 +12,7 @@ * $Id$ */ +#include #include void test( void ) diff --git a/testsuites/psxtests/psxtime/test.c b/testsuites/psxtests/psxtime/test.c index f62d242fa9..e21eb2da9e 100644 --- a/testsuites/psxtests/psxtime/test.c +++ b/testsuites/psxtests/psxtime/test.c @@ -26,7 +26,7 @@ /* * List of dates and times to test. */ -#define NUMBER_OF_DATES 7 +#define NUMBER_OF_DATES 8 rtems_time_of_day Dates[ NUMBER_OF_DATES ] = { /* YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, TICKS */ { 1988, 1, 1, 12, 45, 00, 0 }, @@ -67,7 +67,8 @@ void check_a_tod( /* now do the posix time gets */ result = gettimeofday( &tv, 0 ); assert( result == 0 ); - printf( "gettimeofday: %s", ctime( &tv.tv_sec ) ); + a_time_t = tv.tv_sec; /* ctime() takes a time_t */ + printf( "gettimeofday: %s", ctime( &a_time_t) ); a_time_t = time( 0 ); printf( "time: %s", ctime( &a_time_t ) ); diff --git a/testsuites/sptests/sp26/init.c b/testsuites/sptests/sp26/init.c index e382569a0f..7682ad0011 100644 --- a/testsuites/sptests/sp26/init.c +++ b/testsuites/sptests/sp26/init.c @@ -29,8 +29,6 @@ rtems_task Init( rtems_task_argument argument ) { - rtems_status_code status; - puts( "\n\n*** TEST 26 ***" ); task1(); diff --git a/testsuites/sptests/sp26/system.h b/testsuites/sptests/sp26/system.h index 05b90c4164..5f13e865b3 100644 --- a/testsuites/sptests/sp26/system.h +++ b/testsuites/sptests/sp26/system.h @@ -21,9 +21,7 @@ rtems_task Init( rtems_task_argument argument ); -rtems_task Task_1( - rtems_task_argument argument -); +void task1(void); /* configuration information */ diff --git a/testsuites/sptests/sp29/init.c b/testsuites/sptests/sp29/init.c index 032b1ac42e..a016ebca4b 100644 --- a/testsuites/sptests/sp29/init.c +++ b/testsuites/sptests/sp29/init.c @@ -25,7 +25,6 @@ rtems_interval ticksPerSecond; rtems_task subtask (rtems_task_argument arg) { - int i; rtems_status_code sc; rtems_id sem = (rtems_id)arg; -- cgit v1.2.3