Print this page
10703 smatch unreachable code checking needs reworking
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/test/libc-tests/tests/c11_threads.c
          +++ new/usr/src/test/libc-tests/tests/c11_threads.c
↓ open down ↓ 2 lines elided ↑ open up ↑
   3    3   * Common Development and Distribution License ("CDDL"), version 1.0.
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13      - * Copyright 2017 Joyent, Inc.
       13 + * Copyright 2019 Joyent, Inc.
  14   14   */
  15   15  
  16   16  /*
  17   17   * Validate various C11 threads routines. Specifically we want to cover:
  18   18   *
  19   19   *    o threads
  20   20   *    o mutexes
  21   21   *    o condition variables
  22   22   */
  23   23  
↓ open down ↓ 141 lines elided ↑ open up ↑
 165  165          VERIFY3S(thrd_detach(other), ==, thrd_success);
 166  166  
 167  167          VERIFY3S(thrd_join(self, NULL), ==, thrd_error);
 168  168          VERIFY3S(thrd_join(other, NULL), ==, thrd_error);
 169  169  }
 170  170  
 171  171  static int
 172  172  cthr_test_detach_thr0(void *arg)
 173  173  {
 174  174          thrd_exit(23);
 175      -        abort();
 176  175  }
 177  176  
 178  177  static int
 179  178  cthr_test_detach_thr1(void *arg)
 180  179  {
 181  180          return (42);
 182  181  }
 183  182  
 184  183  static void
 185  184  cthr_test_detach(void)
↓ open down ↓ 200 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX