Print this page
10076 make usr/src/test smatch clean

Split Close
Expand all
Collapse all
          --- old/usr/src/test/os-tests/tests/i386/ldt.c
          +++ new/usr/src/test/os-tests/tests/i386/ldt.c
↓ open down ↓ 20 lines elided ↑ open up ↑
  21   21  #include <string.h>
  22   22  #include <errno.h>
  23   23  #include <pthread.h>
  24   24  #include <err.h>
  25   25  
  26   26  char foo[4096];
  27   27  
  28   28  static void *
  29   29  donothing(void *nothing)
  30   30  {
  31      -        sleep(5);
       31 +        (void) sleep(5);
  32   32          return (NULL);
  33   33  }
  34   34  
  35   35  int
  36   36  main(void)
  37   37  {
  38   38          pthread_t tid;
  39   39  
  40   40          /*
  41   41           * This first is similar to what sbcl does in some variants.  Note the
↓ open down ↓ 19 lines elided ↑ open up ↑
  61   61  
  62   62          if (sysi86(SI86DSCR, &ssd) < 0)
  63   63                  err(-1, "failed to remove segment");
  64   64  
  65   65          for (int i = 0; i < MAXNLDT; i++) {
  66   66                  ssd.sel = SEL_LDT(i);
  67   67                  (void) sysi86(SI86DSCR, &ssd);
  68   68          }
  69   69  
  70   70          for (int i = 0; i < 10; i++)
  71      -                pthread_create(&tid, NULL, donothing, NULL);
       71 +                (void) pthread_create(&tid, NULL, donothing, NULL);
  72   72  
  73   73          if (forkall() == 0) {
  74      -                sleep(2);
       74 +                (void) sleep(2);
  75   75                  _exit(0);
  76   76          }
  77   77  
  78      -        sleep(6);
       78 +        (void) sleep(6);
  79   79          return (0);
  80   80  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX