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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/volcheck/volcheck.c
          +++ new/usr/src/cmd/volcheck/volcheck.c
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12   *
  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 + * Copyright 2017 Gary Mills
  22   23   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   24   * Use is subject to license terms.
  24   25   */
  25   26  
  26   27  #include <stdio.h>
  27   28  #include <stdlib.h>
  28   29  #include <unistd.h>
  29   30  #include <fcntl.h>
  30   31  #include <string.h>
  31   32  #include <strings.h>
↓ open down ↓ 15 lines elided ↑ open up ↑
  47   48              progname);
  48   49          fprintf(stderr,
  49   50              gettext("If path is not supplied all media is checked\n"));
  50   51  }
  51   52  
  52   53  int
  53   54  main(int argc, char **argv)
  54   55  {
  55   56          const char      *opts = "itv";
  56   57          int             c;
  57      -        boolean_t       opt_i = B_FALSE;
  58      -        boolean_t       opt_t = B_FALSE;
  59      -        boolean_t       opt_v = B_FALSE;
  60   58          LibHalContext   *hal_ctx;
  61   59          DBusError       error;
  62   60          rmm_error_t     rmm_error;
  63   61          int             ret = 0;
  64   62  
  65   63          vold_init(argc, argv);
  66   64  
  67   65          while ((c = getopt(argc, argv, opts)) != EOF) {
  68   66                  switch (c) {
  69   67                  case 'i':
  70      -                        opt_i = B_TRUE;
  71   68                          break;
  72   69                  case 't':
  73      -                        opt_t = B_TRUE;
  74   70                          break;
  75   71                  case 'v':
  76      -                        opt_v = B_TRUE;
  77   72                          break;
  78   73                  default:
  79   74                          usage();
  80   75                          return (1);
  81   76                  }
  82   77          }
  83   78  
  84   79          if ((hal_ctx = rmm_hal_init(0, 0, 0, 0, &error, &rmm_error)) == NULL) {
  85   80                  (void) fprintf(stderr,
  86   81                      gettext("HAL initialization failed: %s\n"),
↓ open down ↓ 20 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX