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:
Ralf Corsepius
2011-10-12 04:19:11 +00:00
parent e7edd55890
commit 077184fd50
14 changed files with 57 additions and 26 deletions

View File

@@ -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).

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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( &timestruct );
return (time_encoded != -1);
}

View File

@@ -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);
}

View File

@@ -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", &timestruct );
return (length != 0);
}

View File

@@ -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( &timestruct );
return (buffer != NULL);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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( &timestruct, buffer );
return (buffer_pointer != NULL);
}

View File

@@ -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);
}

View File

@@ -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, &timestruct );
return (timestruct_pointer != NULL);
}

View File

@@ -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, &timestruct );
return (timestruct_pointer != NULL);
}