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/sgs/libld/common/map_v2.c
          +++ new/usr/src/cmd/sgs/libld/common/map_v2.c
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  /*
       28 + * Copyright 2019 Joyent, Inc.
       29 + */
       30 +
       31 +/*
  28   32   * Map file parsing, Version 2 syntax (solaris).
  29   33   */
  30   34  #include        <stdio.h>
  31   35  #include        <unistd.h>
  32   36  #include        <ctype.h>
  33   37  #include        <sys/elf_amd64.h>   /* SHF_AMD64_LARGE */
  34   38  #include        <elfcap.h>
  35   39  #include        "msg.h"
  36   40  #include        "_libld.h"
  37   41  #include        "_map.h"
↓ open down ↓ 3273 lines elided ↑ open up ↑
3311 3315  
3312 3316                                  mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_DIR),
3313 3317                                      ld_map_kwnames(dirlist,
3314 3318                                      SGSOFFSETOF(tldir_t, name),
3315 3319                                      sizeof (dirlist[0]), buf, dirlist_bufsize),
3316 3320                                      ld_map_tokenstr(tok, &tkv, &inv_buf));
3317 3321                          }
3318 3322                          return (FALSE);
3319 3323                  }
3320 3324          }
3321      -
3322      -        /*NOTREACHED*/
3323      -        assert(0);
3324      -        return (FALSE);
3325 3325  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX