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

@@ -18,10 +18,11 @@
  *
  * CDDL HEADER END
  */
 
 /*
+ * Copyright 2017 Gary Mills
  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 

@@ -497,11 +498,11 @@
 int
 special_contents_remove(int ient, struct cfent **ppcfent, const char *pcroot)
 {
         int result = 0;         /* Assume we will succeed.  Return result. */
         char **ppcSC = NULL;    /* The special contents rules, sorted. */
-        int i, j;               /* Indexes into contents & special contents */
+        int i;                  /* Index into contents & special contents */
         FILE *fpi = NULL,       /* Input of contents file */
             *fpo = NULL;        /* Output to temp contents file */
         char cpath[PATH_MAX],   /* Contents file path */
             tcpath[PATH_MAX];   /* Temp contents file path */
         const char *pccontents = "var/sadm/install/contents";

@@ -597,11 +598,11 @@
          * Since both the contents and rules are sorted, we can
          * make a single efficient pass.
          */
         (void) memset(line, 0, LINESZ);
 
-        for (i = 0, j = 0; fgets(line, LINESZ, fpi) != NULL; ) {
+        for (i = 0; fgets(line, LINESZ, fpi) != NULL; ) {
 
                 char *pcpath = NULL;
 
                 /*
                  * Note:  This could be done better:  We should figure out