forked from Imagelibrary/rtems
2011-10-12 Ralf Corsépius <ralf.corsepius@rtems.org>
* psxhdrs/time01.c, psxhdrs/time02.c, psxhdrs/time03.c, psxhdrs/time04.c, psxhdrs/time05.c, psxhdrs/time06.c, psxhdrs/time07.c, psxhdrs/time08.c, psxhdrs/time09.c, psxhdrs/time10.c, psxhdrs/time11.c, psxhdrs/time12.c, psxhdrs/time13.c: Let test() return values (avoid warnings).
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
2011-10-12 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* psxhdrs/time01.c, psxhdrs/time02.c, psxhdrs/time03.c,
|
||||
psxhdrs/time04.c, psxhdrs/time05.c, psxhdrs/time06.c,
|
||||
psxhdrs/time07.c, psxhdrs/time08.c, psxhdrs/time09.c,
|
||||
psxhdrs/time10.c, psxhdrs/time11.c, psxhdrs/time12.c,
|
||||
psxhdrs/time13.c: Let test() return values (avoid warnings).
|
||||
* psxhdrs/timer01.c, psxhdrs/timer02.c, psxhdrs/timer03.c,
|
||||
psxhdrs/timer04.c, psxhdrs/timer05.c, psxhdrs/timer06.c,
|
||||
psxhdrs/timer07.c: Let test() return values (avoid warnings).
|
||||
|
||||
@@ -18,11 +18,13 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
clock_t clock_ticks;
|
||||
|
||||
clock_ticks = clock();
|
||||
|
||||
return (clock_ticks != -1);
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
time_t time1;
|
||||
time_t time2;
|
||||
@@ -30,4 +30,6 @@ void test( void )
|
||||
time2 = 0;
|
||||
|
||||
difference = difftime( time1, time2 );
|
||||
|
||||
return (difference != 0.0);
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
struct tm timestruct;
|
||||
time_t time_encoded;
|
||||
@@ -36,4 +36,6 @@ void test( void )
|
||||
timestruct.tm_isdst = 0;
|
||||
|
||||
time_encoded = mktime( ×truct );
|
||||
|
||||
return (time_encoded != -1);
|
||||
}
|
||||
|
||||
@@ -18,11 +18,13 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
time_t new_time;
|
||||
|
||||
new_time = time( &new_time );
|
||||
|
||||
return (new_time != -1);
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
size_t length;
|
||||
size_t max_length;
|
||||
@@ -30,4 +30,6 @@ void test( void )
|
||||
max_length = sizeof( buffer );
|
||||
|
||||
length = strftime( buffer, max_length, "%A", ×truct );
|
||||
|
||||
return (length != 0);
|
||||
}
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
char *buffer;
|
||||
struct tm timestruct;
|
||||
|
||||
buffer = asctime( ×truct );
|
||||
|
||||
return (buffer != NULL);
|
||||
}
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
char *buffer;
|
||||
time_t time;
|
||||
|
||||
buffer = ctime( &time );
|
||||
|
||||
return (buffer != NULL);
|
||||
}
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
time_t time;
|
||||
struct tm *timestruct;
|
||||
|
||||
timestruct = gmtime( &time );
|
||||
|
||||
return (timestruct != NULL);
|
||||
}
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
time_t time;
|
||||
struct tm *timestruct;
|
||||
|
||||
timestruct = localtime( &time );
|
||||
|
||||
return (timestruct != NULL);
|
||||
}
|
||||
|
||||
@@ -18,13 +18,15 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
char *buffer_pointer;
|
||||
struct tm timestruct;
|
||||
char buffer[ 80 ];
|
||||
|
||||
buffer_pointer = asctime_r( ×truct, buffer );
|
||||
|
||||
return (buffer_pointer != NULL);
|
||||
}
|
||||
|
||||
@@ -18,13 +18,15 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
char *buffer_pointer;
|
||||
char buffer[ 80 ];
|
||||
time_t time;
|
||||
|
||||
buffer_pointer = ctime_r( &time, buffer );
|
||||
|
||||
return (buffer_pointer != NULL);
|
||||
}
|
||||
|
||||
@@ -18,13 +18,15 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
time_t time;
|
||||
struct tm *timestruct_pointer;
|
||||
struct tm timestruct;
|
||||
|
||||
timestruct_pointer = gmtime_r( &time, ×truct );
|
||||
|
||||
return (timestruct_pointer != NULL);
|
||||
}
|
||||
|
||||
@@ -18,13 +18,15 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
time_t time;
|
||||
struct tm *timestruct_pointer;
|
||||
struct tm timestruct;
|
||||
|
||||
timestruct_pointer = localtime_r( &time, ×truct );
|
||||
|
||||
return (timestruct_pointer != NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user