Changeset 55719ba in rtems


Ignore:
Timestamp:
Dec 4, 2018, 10:55:53 PM (7 months ago)
Author:
Joel Sherrill <joel@…>
Branches:
master
Children:
5bb1f3b2
Parents:
b0b095c
git-author:
Joel Sherrill <joel@…> (12/04/18 22:55:53)
git-committer:
Joel Sherrill <joel@…> (12/04/18 22:56:01)
Message:

psxhdrs: Fix warnings

Location:
testsuites/psxtests/psxhdrs
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/psxhdrs/dlfcn/dlsym.c

    rb0b095c r55719ba  
    33 *  @brief dlsym() API Conformance Test
    44 */
    5  /*
     5
     6/*
    67 *  COPYRIGHT (c) 2018.
    78 *  Himanshu Sekhar Nayak
     
    1920 */
    2021
    21  #ifdef HAVE_CONFIG_H
    22  #include "config.h"
    23  #endif
     22#ifdef HAVE_CONFIG_H
     23#include "config.h"
     24#endif
    2425
    25  #include <dlfcn.h>
     26#include <dlfcn.h>
    2627
    27  int test( void );
     28int test( void );
    2829
    29  int result = 1;
     30int test( void )
     31{
     32  void *filename;
     33  int *iptr;
    3034
    31  int test( void )
    32  {
    33    void *filename;
    34    int *iptr;
     35  filename = dlopen( "mylib.so", RTLD_LOCAL | RTLD_LAZY );
     36  iptr = dlsym( filename, "my_function" );
    3537
    36    filename = dlopen( "mylib.so", RTLD_LOCAL | RTLD_LAZY );
    37    iptr = dlsym( filename, "my_function" );
    38    result = 0;
    39 
    40    return result;
    41  }
     38  return (iptr != NULL);
     39}
  • testsuites/psxtests/psxhdrs/sys/time/getitimer.c

    rb0b095c r55719ba  
    3030int test(void)
    3131{
    32   int which,callback;
    33   struct itimerval timeval;
    34   it_interval interval = 0;
    35   it_value value = 0;
     32  int which = ITIMER_REAL;
     33  int callback;
     34  struct itimerval timeval = { {0,0}, {0,0} };
    3635
    37   timeval.it_interval = interval;
    38   timeval.it_value = value;
    3936  callback = getitimer(which, &timeval);
    4037  return (callback == 0);
  • testsuites/psxtests/psxhdrs/sys/time/gettimeofday.c

    rb0b095c r55719ba  
    3030int test(void)
    3131{
    32   int which,callback;
    33   struct itimerval timeval;
    34   it_interval interval = 0;
    35   it_value value = 0;
     32  struct timeval tv;
     33  struct timezone tz;
     34  int callback;
    3635
    37   timeval.it_interval = interval;
    38   timeval.it_value = value;
    39   callback = gettimeofday(&timeval);
     36  callback = gettimeofday(&tv, &tz);
    4037  return (callback == 0);
    4138}
  • testsuites/psxtests/psxhdrs/sys/time/setitimer.c

    rb0b095c r55719ba  
    3030int test(void)
    3131{
    32   int which,callback;
    33   struct itimerval timeval;
    34   it_interval interval = 0;
    35   it_value value = 0;
     32  int which = ITIMER_REAL;
     33  int callback;
     34  struct itimerval timeval = { {0,0}, {0,0} };
    3635
    37   timeval.it_interval = interval;
    38   timeval.it_value = value;
    3936  setitimer(which, &timeval, NULL);
    4037  callback = getitimer(which, &timeval);
Note: See TracChangeset for help on using the changeset viewer.