Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/ipf/dist fix unused variable warnings
details: https://anonhg.NetBSD.org/src/rev/a5d77089f4c7
branches: trunk
changeset: 790749:a5d77089f4c7
user: christos <christos%NetBSD.org@localhost>
date: Sun Oct 20 03:09:11 2013 +0000
description:
fix unused variable warnings
diffstat:
external/bsd/ipf/dist/lib/ipft_hx.c | 4 +---
external/bsd/ipf/dist/lib/ipft_tx.c | 4 +---
external/bsd/ipf/dist/lib/printfieldhdr.c | 5 ++---
external/bsd/ipf/dist/lib/printfraginfo.c | 6 +++---
external/bsd/ipf/dist/tools/ipfcomp.c | 4 +---
external/bsd/ipf/dist/tools/ippool.c | 12 ++----------
6 files changed, 10 insertions(+), 25 deletions(-)
diffs (156 lines):
diff -r bf8a0e510eb0 -r a5d77089f4c7 external/bsd/ipf/dist/lib/ipft_hx.c
--- a/external/bsd/ipf/dist/lib/ipft_hx.c Sun Oct 20 03:02:26 2013 +0000
+++ b/external/bsd/ipf/dist/lib/ipft_hx.c Sun Oct 20 03:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipft_hx.c,v 1.2 2012/07/22 14:27:36 darrenr Exp $ */
+/* $NetBSD: ipft_hx.c,v 1.3 2013/10/20 03:09:11 christos Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -65,10 +65,8 @@
char line[513];
ip_t *ip;
char *buf;
- int cnt;
buf = (char *)mb->mb_buf;
- cnt = sizeof(mb->mb_buf);
/*
* interpret start of line as possibly "[ifname]" or
* "[in/out,ifname]".
diff -r bf8a0e510eb0 -r a5d77089f4c7 external/bsd/ipf/dist/lib/ipft_tx.c
--- a/external/bsd/ipf/dist/lib/ipft_tx.c Sun Oct 20 03:02:26 2013 +0000
+++ b/external/bsd/ipf/dist/lib/ipft_tx.c Sun Oct 20 03:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipft_tx.c,v 1.2 2012/07/22 14:27:36 darrenr Exp $ */
+/* $NetBSD: ipft_tx.c,v 1.3 2013/10/20 03:09:11 christos Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -122,10 +122,8 @@
char line[513];
ip_t *ip;
char *buf;
- int cnt;
buf = (char *)mb->mb_buf;
- cnt = sizeof(mb->mb_buf);
*ifn = NULL;
while (fgets(line, sizeof(line)-1, tfp)) {
diff -r bf8a0e510eb0 -r a5d77089f4c7 external/bsd/ipf/dist/lib/printfieldhdr.c
--- a/external/bsd/ipf/dist/lib/printfieldhdr.c Sun Oct 20 03:02:26 2013 +0000
+++ b/external/bsd/ipf/dist/lib/printfieldhdr.c Sun Oct 20 03:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: printfieldhdr.c,v 1.2 2012/07/22 14:27:36 darrenr Exp $ */
+/* $NetBSD: printfieldhdr.c,v 1.3 2013/10/20 03:09:11 christos Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -18,10 +18,9 @@
{
wordtab_t *w;
char *s, *t;
- int i;
if (field->w_value == -2) {
- for (i = 0, w = words; w->w_word != NULL; ) {
+ for (w = words; w->w_word != NULL; ) {
if (w->w_value > 0) {
printfieldhdr(words, w);
w++;
diff -r bf8a0e510eb0 -r a5d77089f4c7 external/bsd/ipf/dist/lib/printfraginfo.c
--- a/external/bsd/ipf/dist/lib/printfraginfo.c Sun Oct 20 03:02:26 2013 +0000
+++ b/external/bsd/ipf/dist/lib/printfraginfo.c Sun Oct 20 03:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: printfraginfo.c,v 1.2 2012/07/22 14:27:36 darrenr Exp $ */
+/* $NetBSD: printfraginfo.c,v 1.3 2013/10/20 03:09:11 christos Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -16,7 +16,6 @@
char *prefix;
struct ipfr *ifr;
{
- frentry_t fr;
int family;
PRINTF("%s", prefix);
@@ -27,10 +26,11 @@
PRINTF("inet");
family = AF_INET;
}
- fr.fr_flags = 0xffffffff;
PRINTF(" %s -> ", hostname(family, &ifr->ipfr_src));
/*
+ frentry_t fr;
+ fr.fr_flags = 0xffffffff;
if (kmemcpy((char *)&fr, (u_long)ifr->ipfr_rule,
sizeof(fr)) == -1)
return;
diff -r bf8a0e510eb0 -r a5d77089f4c7 external/bsd/ipf/dist/tools/ipfcomp.c
--- a/external/bsd/ipf/dist/tools/ipfcomp.c Sun Oct 20 03:02:26 2013 +0000
+++ b/external/bsd/ipf/dist/tools/ipfcomp.c Sun Oct 20 03:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipfcomp.c,v 1.3 2012/07/22 14:27:51 darrenr Exp $ */
+/* $NetBSD: ipfcomp.c,v 1.4 2013/10/20 03:09:11 christos Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -65,7 +65,6 @@
void printc(fr)
frentry_t *fr;
{
- fripf_t *ipf;
u_long *ulp;
char *and;
FILE *fp;
@@ -78,7 +77,6 @@
if ((fr->fr_type == FR_T_IPF) &&
((fr->fr_datype != FRI_NORMAL) || (fr->fr_satype != FRI_NORMAL)))
return;
- ipf = fr->fr_ipf;
if (cfile == NULL)
cfile = fopen("ip_rules.c", "w");
diff -r bf8a0e510eb0 -r a5d77089f4c7 external/bsd/ipf/dist/tools/ippool.c
--- a/external/bsd/ipf/dist/tools/ippool.c Sun Oct 20 03:02:26 2013 +0000
+++ b/external/bsd/ipf/dist/tools/ippool.c Sun Oct 20 03:09:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ippool.c,v 1.3 2012/07/22 14:27:51 darrenr Exp $ */
+/* $NetBSD: ippool.c,v 1.4 2013/10/20 03:09:11 christos Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -409,16 +409,12 @@
int argc;
char *argv[];
{
- int c, type, role, live_kernel;
+ int c, type, role;
ipf_pool_stat_t plstat;
ipf_dstl_stat_t dlstat;
- char *kernel, *core;
iphtstat_t htstat;
iplookupop_t op;
- core = NULL;
- kernel = NULL;
- live_kernel = 1;
type = IPLT_ALL;
role = IPL_LOGALL;
@@ -431,12 +427,8 @@
opts |= OPT_DEBUG;
break;
case 'M' :
- live_kernel = 0;
- core = optarg;
break;
case 'N' :
- live_kernel = 0;
- kernel = optarg;
break;
case 'o' :
role = getrole(optarg);
Home |
Main Index |
Thread Index |
Old Index