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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/print/bsd-sysv-commands/lpr.c
          +++ new/usr/src/cmd/print/bsd-sysv-commands/lpr.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 2008 Sun Microsystems, Inc.  All rights reserved.
  24   25   * Use is subject to license terms.
  25   26   *
  26   27   */
  27   28  
  28   29  /* $Id: lpr.c 146 2006-03-24 00:26:54Z njacobs $ */
  29   30  
  30      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  31      -
  32   31  #include <stdio.h>
  33   32  #include <stdlib.h>
  34   33  #include <unistd.h>
  35   34  #include <string.h>
  36   35  #include <locale.h>
  37   36  #include <libintl.h>
  38   37  #include <papi.h>
  39   38  #include "common.h"
  40   39  
  41   40  #ifdef HAVE_LIBMAGIC    /* for mimetype auto-detection */
↓ open down ↓ 26 lines elided ↑ open up ↑
  68   67          papi_service_t svc = NULL;
  69   68          papi_attribute_t **list = NULL;
  70   69          papi_job_t job = NULL;
  71   70          int exit_code = 0;
  72   71          char *printer = NULL;
  73   72          char prefetch[3];
  74   73          int prefetch_len = sizeof (prefetch);
  75   74          papi_encryption_t encryption = PAPI_ENCRYPT_NEVER;
  76   75          int dump = 0;
  77   76          int validate = 0;
  78      -        int remove = 0;
  79   77          int copy = 1;   /* default is to copy the data */
  80   78          char *document_format = "text/plain";
  81   79          int c;
  82   80  
  83   81          (void) setlocale(LC_ALL, "");
  84   82          (void) textdomain("SUNW_OST_OSCMD");
  85   83  
  86   84          while ((c = getopt(ac, av,
  87   85                          "EP:#:C:DVJ:T:w:i:hplrstdgvcfmn1:2:3:4:")) != EOF)
  88   86                  switch (c) {
↓ open down ↓ 74 lines elided ↑ open up ↑
 163  161                          break;
 164  162                  case 'v':
 165  163                          papiAttributeListAddString(&list, PAPI_ATTR_EXCL,
 166  164                                  "document-format", "application/x-raster");
 167  165                          break;
 168  166                  case 'm':
 169  167                          papiAttributeListAddBoolean(&list, PAPI_ATTR_EXCL,
 170  168                                  "rfc-1179-mail", 1);
 171  169                          break;
 172  170                  case 'r':
 173      -                        remove = 1;
 174  171                          break;
 175  172                  case 's':
 176  173                          copy = 0;
 177  174                          break;
 178  175                  case 'V':       /* validate */
 179  176                          validate = 1;
 180  177                          break;
 181  178                  case '1':
 182  179                          papiAttributeListAddString(&list, PAPI_ATTR_EXCL,
 183  180                                  "rfc-1179-font-r", optarg);
↓ open down ↓ 93 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX