forked from Imagelibrary/rtems
Fixed warnings.
This commit is contained in:
@@ -22,7 +22,6 @@
|
|||||||
void Task_1()
|
void Task_1()
|
||||||
{
|
{
|
||||||
ER status;
|
ER status;
|
||||||
PRI previous_priority;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX - Change to itron routine.
|
* XXX - Change to itron routine.
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ m_sec = r_time*1000;
|
|||||||
printf( "Time from 1970: %d\n", t_time );
|
printf( "Time from 1970: %d\n", t_time );
|
||||||
printf( "Time between 1970 and 1985: %d\n", s_time );
|
printf( "Time between 1970 and 1985: %d\n", s_time );
|
||||||
printf( "Time from 1985: %d\n", r_time );
|
printf( "Time from 1985: %d\n", r_time );
|
||||||
printf("milliseconds: %f\n",m_sec);
|
printf("milliseconds: %ld\n",m_sec);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ rtems_task Init (rtems_task_argument argument);
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
int fileno( FILE *stream); /* beyond ANSI */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test raw (ICANON=0) input
|
* Test raw (ICANON=0) input
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ void *Task_1(
|
|||||||
void *argument
|
void *argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int status;
|
|
||||||
|
|
||||||
puts( "Task_1: exitting" );
|
puts( "Task_1: exitting" );
|
||||||
|
|
||||||
return( &Task1_id );
|
return( &Task1_id );
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
/*
|
/*
|
||||||
* List of dates and times to test.
|
* 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 ] = {
|
rtems_time_of_day Dates[ NUMBER_OF_DATES ] = {
|
||||||
/* YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, TICKS */
|
/* YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, TICKS */
|
||||||
{ 1988, 1, 1, 12, 45, 00, 0 },
|
{ 1988, 1, 1, 12, 45, 00, 0 },
|
||||||
@@ -67,7 +67,8 @@ void check_a_tod(
|
|||||||
/* now do the posix time gets */
|
/* now do the posix time gets */
|
||||||
result = gettimeofday( &tv, 0 );
|
result = gettimeofday( &tv, 0 );
|
||||||
assert( result == 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 );
|
a_time_t = time( 0 );
|
||||||
printf( "time: %s", ctime( &a_time_t ) );
|
printf( "time: %s", ctime( &a_time_t ) );
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ rtems_task Init(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rtems_status_code status;
|
|
||||||
|
|
||||||
puts( "\n\n*** TEST 26 ***" );
|
puts( "\n\n*** TEST 26 ***" );
|
||||||
|
|
||||||
task1();
|
task1();
|
||||||
|
|||||||
@@ -21,9 +21,7 @@ rtems_task Init(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
);
|
);
|
||||||
|
|
||||||
rtems_task Task_1(
|
void task1(void);
|
||||||
rtems_task_argument argument
|
|
||||||
);
|
|
||||||
|
|
||||||
/* configuration information */
|
/* configuration information */
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ rtems_interval ticksPerSecond;
|
|||||||
rtems_task
|
rtems_task
|
||||||
subtask (rtems_task_argument arg)
|
subtask (rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
rtems_status_code sc;
|
rtems_status_code sc;
|
||||||
rtems_id sem = (rtems_id)arg;
|
rtems_id sem = (rtems_id)arg;
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
void Task_1()
|
void Task_1()
|
||||||
{
|
{
|
||||||
ER status;
|
ER status;
|
||||||
PRI previous_priority;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX - Change to itron routine.
|
* XXX - Change to itron routine.
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ m_sec = r_time*1000;
|
|||||||
printf( "Time from 1970: %d\n", t_time );
|
printf( "Time from 1970: %d\n", t_time );
|
||||||
printf( "Time between 1970 and 1985: %d\n", s_time );
|
printf( "Time between 1970 and 1985: %d\n", s_time );
|
||||||
printf( "Time from 1985: %d\n", r_time );
|
printf( "Time from 1985: %d\n", r_time );
|
||||||
printf("milliseconds: %f\n",m_sec);
|
printf("milliseconds: %ld\n",m_sec);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ rtems_task Init (rtems_task_argument argument);
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
int fileno( FILE *stream); /* beyond ANSI */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test raw (ICANON=0) input
|
* Test raw (ICANON=0) input
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ void *Task_1(
|
|||||||
void *argument
|
void *argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int status;
|
|
||||||
|
|
||||||
puts( "Task_1: exitting" );
|
puts( "Task_1: exitting" );
|
||||||
|
|
||||||
return( &Task1_id );
|
return( &Task1_id );
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
/*
|
/*
|
||||||
* List of dates and times to test.
|
* 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 ] = {
|
rtems_time_of_day Dates[ NUMBER_OF_DATES ] = {
|
||||||
/* YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, TICKS */
|
/* YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, TICKS */
|
||||||
{ 1988, 1, 1, 12, 45, 00, 0 },
|
{ 1988, 1, 1, 12, 45, 00, 0 },
|
||||||
@@ -67,7 +67,8 @@ void check_a_tod(
|
|||||||
/* now do the posix time gets */
|
/* now do the posix time gets */
|
||||||
result = gettimeofday( &tv, 0 );
|
result = gettimeofday( &tv, 0 );
|
||||||
assert( result == 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 );
|
a_time_t = time( 0 );
|
||||||
printf( "time: %s", ctime( &a_time_t ) );
|
printf( "time: %s", ctime( &a_time_t ) );
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ rtems_task Init(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rtems_status_code status;
|
|
||||||
|
|
||||||
puts( "\n\n*** TEST 26 ***" );
|
puts( "\n\n*** TEST 26 ***" );
|
||||||
|
|
||||||
task1();
|
task1();
|
||||||
|
|||||||
@@ -21,9 +21,7 @@ rtems_task Init(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
);
|
);
|
||||||
|
|
||||||
rtems_task Task_1(
|
void task1(void);
|
||||||
rtems_task_argument argument
|
|
||||||
);
|
|
||||||
|
|
||||||
/* configuration information */
|
/* configuration information */
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ rtems_interval ticksPerSecond;
|
|||||||
rtems_task
|
rtems_task
|
||||||
subtask (rtems_task_argument arg)
|
subtask (rtems_task_argument arg)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
rtems_status_code sc;
|
rtems_status_code sc;
|
||||||
rtems_id sem = (rtems_id)arg;
|
rtems_id sem = (rtems_id)arg;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user