Print this page
8485 Remove set but unused variables in usr/src/cmd

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sh/xec.c
          +++ new/usr/src/cmd/sh/xec.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
       23 + * Copyright 2017 Gary Mills
  23   24   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   25   * Use is subject to license terms.
  25   26   */
  26   27  
  27   28  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  28   29  /*        All Rights Reserved   */
  29   30  
  30   31  /*
  31   32   *
  32   33   * UNIX shell
↓ open down ↓ 84 lines elided ↑ open up ↑
 117  118                                   * running in the function.
 118  119                                   */
 119  120                                  n->namenv = (unsigned char *)f;
 120  121                                  attrib(n, N_FUNCTN);
 121  122                                  hash_func(n->namid);
 122  123                                  break;
 123  124                          }
 124  125  
 125  126                  case TCOM:
 126  127                          {
 127      -                                unsigned char   *a1, *name;
      128 +                                unsigned char   *name;
 128  129                                  int     argn, internal;
 129  130                                  struct argnod   *schain = gchain;
 130  131                                  struct ionod    *io = t->treio;
 131  132                                  short   cmdhash;
 132  133                                  short   comtype;
 133  134  
 134  135                                  exitval = 0;
 135  136  
 136  137                                  gchain = 0;
 137  138                                  argn = getarg(t);
 138  139                                  com = scan(argn);
 139      -                                a1 = com[1];
 140  140                                  gchain = schain;
 141  141  
 142  142                                  if (argn != 0)
 143  143                                          cmdhash = pathlook(com[0], 1, comptr(t)->comset);
 144  144  
 145  145                                  if (argn == 0 || (comtype = hashtype(cmdhash)) == BUILTIN) {
 146  146                                          setlist(comptr(t)->comset, 0);
 147  147                                  }
 148  148  
 149  149                                  if (argn && (flags&noexec) == 0)
↓ open down ↓ 391 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX