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/cmd/od/od.c
          +++ new/usr/src/cmd/od/od.c
↓ open down ↓ 6 lines elided ↑ open up ↑
   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
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13   13   * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
  14   14   */
  15   15  
  16   16  /*
       17 + * Copyright 2019 Joyent, Inc.
       18 + */
       19 +
       20 +/*
  17   21   * od - octal dump.  Not really just octal anymore; read the POSIX
  18   22   * specification for it -- its more complex than you think!
  19   23   *
  20   24   * NB: We followed the POSIX semantics fairly strictly, where the
  21   25   * legacy code's behavior was in conflict.  In many cases the legacy
  22   26   * Solaris code was so completely broken as to be completely unusable.
  23   27   * (For example, the long double support was broken beyond
  24   28   * imagination!)  Note that GNU coreutils violates POSIX in a few
  25   29   * interesting ways, such as changing the numbering of the addresses
  26   30   * when skipping.  (Address starts should always be at 0, according to
↓ open down ↓ 499 lines elided ↑ open up ↑
 526  530                                  typestr++;
 527  531                                  add_out(&output_hex_q);
 528  532                          } else {
 529  533                                  add_out(&output_hex_d);
 530  534                          }
 531  535                          break;
 532  536  
 533  537                  default:
 534  538                          errx(1, _("unrecognized type string character: %c"),
 535  539                              *typestr);
 536      -                        exit(1);
 537  540                  }
 538  541          }
 539  542  }
 540  543  
 541  544  int
 542  545  main(int argc, char **argv)
 543  546  {
 544  547          int             c;
 545  548          int             i;
 546  549          buffer_t        buffer;
↓ open down ↓ 375 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX