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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/ipf/tools/ipfcomp.c
          +++ new/usr/src/cmd/ipf/tools/ipfcomp.c
   1    1  /*
   2    2   * Copyright (C) 1993-2001 by Darren Reed.
   3    3   *
   4    4   * See the IPFILTER.LICENCE file for details on licencing.
   5    5   *
   6    6   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
   7    7   * Use is subject to license terms.
        8 + * Copyright 2017 Gary Mills
   8    9   */
   9   10  
  10      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  11      -
  12   11  #if !defined(lint)
  13   12  static const char sccsid[] = "@(#)ip_fil.c      2.41 6/5/96 (C) 1993-2000 Darren Reed";
  14   13  static const char rcsid[] = "@(#)$Id: ipfcomp.c,v 1.24.2.2 2004/04/28 10:34:44 darrenr Exp $";
  15   14  #endif
  16   15  
  17   16  #include "ipf.h"
  18   17  
  19   18  
  20   19  typedef struct {
  21   20          int c;
↓ open down ↓ 40 lines elided ↑ open up ↑
  62   61  
  63   62  static  FILE    *cfile = NULL;
  64   63  
  65   64  /*
  66   65   * This is called once per filter rule being loaded to emit data structures
  67   66   * required.
  68   67   */
  69   68  void printc(fr)
  70   69  frentry_t *fr;
  71   70  {
  72      -        fripf_t *ipf;
  73   71          u_long *ulp;
  74   72          char *and;
  75   73          FILE *fp;
  76   74          int i;
  77   75  
  78   76          if (fr->fr_v != 4)
  79   77                  return;
  80   78          if ((fr->fr_type != FR_T_IPF) && (fr->fr_type != FR_T_NONE))
  81   79                  return;
  82   80          if ((fr->fr_type == FR_T_IPF) &&
  83   81              ((fr->fr_datype != FRI_NORMAL) || (fr->fr_satype != FRI_NORMAL)))
  84   82                  return;
  85      -        ipf = fr->fr_ipf;
  86   83  
  87   84          if (cfile == NULL)
  88   85                  cfile = fopen("ip_rules.c", "w");
  89   86          if (cfile == NULL)
  90   87                  return;
  91   88          fp = cfile;
  92   89          if (count == 0) {
  93   90                  fprintf(fp, "/*\n");
  94   91                  fprintf(fp, "* Copyright (C) 1993-2000 by Darren Reed.\n");
  95   92                  fprintf(fp, "*\n");
↓ open down ↓ 1282 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX