From 0d199bb941aac7052a19dd5d75520d016fff1765 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Tue, 29 Jan 2008 13:48:05 +0000 Subject: [PATCH]: fix gcc warnings Max Kellermann --- iptables-xml.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'iptables-xml.c') diff --git a/iptables-xml.c b/iptables-xml.c index 2aefb1a..087b7c7 100644 --- a/iptables-xml.c +++ b/iptables-xml.c @@ -54,7 +54,7 @@ static struct option options[] = { {"verbose", 0, 0, 'v'}, {"combine", 0, 0, 'c'}, {"help", 0, 0, 'h'}, - {0} + { .name = NULL } }; static void @@ -85,10 +85,10 @@ parse_counters(char *string, struct ipt_counters *ctr) /* global new argv and argc */ static char *newargv[255]; -static int newargc = 0; +static unsigned newargc = 0; static char *oldargv[255]; -static int oldargc = 0; +static unsigned oldargc = 0; /* arg meta data, were they quoted, frinstance */ static int newargvattr[255]; @@ -129,7 +129,7 @@ add_argv(char *what, int quoted) static void free_argv(void) { - int i; + unsigned i; for (i = 0; i < newargc; i++) { free(newargv[i]); @@ -149,7 +149,7 @@ free_argv(void) static void save_argv(void) { - int i; + unsigned i; for (i = 0; i < oldargc; i++) free(oldargv[i]); @@ -228,7 +228,7 @@ xmlAttrI(char *name, long long int num) } static void -closeChain() +closeChain(void) { if (curChain[0] == 0) return; @@ -316,7 +316,7 @@ saveChain(char *chain, char *policy, struct ipt_counters *ctr) } static void -finishChains() +finishChains(void) { int c; @@ -331,7 +331,7 @@ finishChains() } static void -closeTable() +closeTable(void) { closeChain(); finishChains(); @@ -536,7 +536,7 @@ do_rule_part(char *leveltag1, char *leveltag2, int part, int argc, } static int -compareRules() +compareRules(void) { /* compare arguments up to -j or -g for match. NOTE: We don't want to combine actions if there were no criteria @@ -545,8 +545,8 @@ compareRules() is the case when processing the ACTUAL output of actual iptables-save rather than a file merely in a compatable format */ - int old = 0; - int new = 0; + unsigned old = 0; + unsigned new = 0; int compare = 0; @@ -748,7 +748,7 @@ main(int argc, char *argv[]) ret = 1; } else if (curTable[0]) { - int a; + unsigned a; char *ptr = buffer; char *pcnt = NULL; char *bcnt = NULL; -- cgit v1.2.3