From 55719bab1391a80fbceceac474f66ac69eb87c65 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 4 Dec 2018 16:55:53 -0600 Subject: psxhdrs: Fix warnings --- testsuites/psxtests/psxhdrs/sys/time/getitimer.c | 9 +++------ testsuites/psxtests/psxhdrs/sys/time/gettimeofday.c | 11 ++++------- testsuites/psxtests/psxhdrs/sys/time/setitimer.c | 9 +++------ 3 files changed, 10 insertions(+), 19 deletions(-) (limited to 'testsuites/psxtests/psxhdrs/sys') diff --git a/testsuites/psxtests/psxhdrs/sys/time/getitimer.c b/testsuites/psxtests/psxhdrs/sys/time/getitimer.c index aa1ce8b428..16ef52edd1 100644 --- a/testsuites/psxtests/psxhdrs/sys/time/getitimer.c +++ b/testsuites/psxtests/psxhdrs/sys/time/getitimer.c @@ -29,13 +29,10 @@ int test(void); int test(void) { - int which,callback; - struct itimerval timeval; - it_interval interval = 0; - it_value value = 0; + int which = ITIMER_REAL; + int callback; + struct itimerval timeval = { {0,0}, {0,0} }; - timeval.it_interval = interval; - timeval.it_value = value; callback = getitimer(which, &timeval); return (callback == 0); } diff --git a/testsuites/psxtests/psxhdrs/sys/time/gettimeofday.c b/testsuites/psxtests/psxhdrs/sys/time/gettimeofday.c index 60a56f3370..f27436c3f3 100644 --- a/testsuites/psxtests/psxhdrs/sys/time/gettimeofday.c +++ b/testsuites/psxtests/psxhdrs/sys/time/gettimeofday.c @@ -29,13 +29,10 @@ int test(void); int test(void) { - int which,callback; - struct itimerval timeval; - it_interval interval = 0; - it_value value = 0; + struct timeval tv; + struct timezone tz; + int callback; - timeval.it_interval = interval; - timeval.it_value = value; - callback = gettimeofday(&timeval); + callback = gettimeofday(&tv, &tz); return (callback == 0); } diff --git a/testsuites/psxtests/psxhdrs/sys/time/setitimer.c b/testsuites/psxtests/psxhdrs/sys/time/setitimer.c index 32fb4da7ee..fc7588db44 100644 --- a/testsuites/psxtests/psxhdrs/sys/time/setitimer.c +++ b/testsuites/psxtests/psxhdrs/sys/time/setitimer.c @@ -29,13 +29,10 @@ int test(void); int test(void) { - int which,callback; - struct itimerval timeval; - it_interval interval = 0; - it_value value = 0; + int which = ITIMER_REAL; + int callback; + struct itimerval timeval = { {0,0}, {0,0} }; - timeval.it_interval = interval; - timeval.it_value = value; setitimer(which, &timeval, NULL); callback = getitimer(which, &timeval); return (callback == 0); -- cgit v1.2.3