[netfilter-cvslog] r7306 - in trunk/iptables: . extensions include/libiptc

kaber at trash.net kaber at trash.net
Tue Jan 29 14:48:05 CET 2008


Author: kaber at trash.net
Date: 2008-01-29 14:48:05 +0100 (Tue, 29 Jan 2008)
New Revision: 7306

Modified:
   trunk/iptables/configure.ac
   trunk/iptables/extensions/dscp_helper.c
   trunk/iptables/extensions/libip6t_HL.c
   trunk/iptables/extensions/libip6t_LOG.c
   trunk/iptables/extensions/libip6t_REJECT.c
   trunk/iptables/extensions/libip6t_ah.c
   trunk/iptables/extensions/libip6t_dst.c
   trunk/iptables/extensions/libip6t_frag.c
   trunk/iptables/extensions/libip6t_hbh.c
   trunk/iptables/extensions/libip6t_hl.c
   trunk/iptables/extensions/libip6t_icmp6.c
   trunk/iptables/extensions/libip6t_ipv6header.c
   trunk/iptables/extensions/libip6t_mh.c
   trunk/iptables/extensions/libip6t_policy.c
   trunk/iptables/extensions/libip6t_rt.c
   trunk/iptables/extensions/libipt_CLUSTERIP.c
   trunk/iptables/extensions/libipt_DNAT.c
   trunk/iptables/extensions/libipt_ECN.c
   trunk/iptables/extensions/libipt_LOG.c
   trunk/iptables/extensions/libipt_MASQUERADE.c
   trunk/iptables/extensions/libipt_NETMAP.c
   trunk/iptables/extensions/libipt_REDIRECT.c
   trunk/iptables/extensions/libipt_REJECT.c
   trunk/iptables/extensions/libipt_SAME.c
   trunk/iptables/extensions/libipt_SNAT.c
   trunk/iptables/extensions/libipt_TTL.c
   trunk/iptables/extensions/libipt_ULOG.c
   trunk/iptables/extensions/libipt_addrtype.c
   trunk/iptables/extensions/libipt_ah.c
   trunk/iptables/extensions/libipt_ecn.c
   trunk/iptables/extensions/libipt_icmp.c
   trunk/iptables/extensions/libipt_policy.c
   trunk/iptables/extensions/libipt_realm.c
   trunk/iptables/extensions/libipt_recent.c
   trunk/iptables/extensions/libipt_ttl.c
   trunk/iptables/extensions/libxt_CLASSIFY.c
   trunk/iptables/extensions/libxt_CONNMARK.c
   trunk/iptables/extensions/libxt_CONNSECMARK.c
   trunk/iptables/extensions/libxt_DSCP.c
   trunk/iptables/extensions/libxt_MARK.c
   trunk/iptables/extensions/libxt_NFLOG.c
   trunk/iptables/extensions/libxt_NFQUEUE.c
   trunk/iptables/extensions/libxt_RATEEST.c
   trunk/iptables/extensions/libxt_SECMARK.c
   trunk/iptables/extensions/libxt_TCPMSS.c
   trunk/iptables/extensions/libxt_TCPOPTSTRIP.c
   trunk/iptables/extensions/libxt_TOS.c
   trunk/iptables/extensions/libxt_comment.c
   trunk/iptables/extensions/libxt_connbytes.c
   trunk/iptables/extensions/libxt_connlimit.c
   trunk/iptables/extensions/libxt_connmark.c
   trunk/iptables/extensions/libxt_conntrack.c
   trunk/iptables/extensions/libxt_dccp.c
   trunk/iptables/extensions/libxt_dscp.c
   trunk/iptables/extensions/libxt_esp.c
   trunk/iptables/extensions/libxt_hashlimit.c
   trunk/iptables/extensions/libxt_helper.c
   trunk/iptables/extensions/libxt_iprange.c
   trunk/iptables/extensions/libxt_length.c
   trunk/iptables/extensions/libxt_limit.c
   trunk/iptables/extensions/libxt_mac.c
   trunk/iptables/extensions/libxt_mark.c
   trunk/iptables/extensions/libxt_multiport.c
   trunk/iptables/extensions/libxt_owner.c
   trunk/iptables/extensions/libxt_physdev.c
   trunk/iptables/extensions/libxt_pkttype.c
   trunk/iptables/extensions/libxt_quota.c
   trunk/iptables/extensions/libxt_rateest.c
   trunk/iptables/extensions/libxt_sctp.c
   trunk/iptables/extensions/libxt_state.c
   trunk/iptables/extensions/libxt_statistic.c
   trunk/iptables/extensions/libxt_string.c
   trunk/iptables/extensions/libxt_tcp.c
   trunk/iptables/extensions/libxt_tcpmss.c
   trunk/iptables/extensions/libxt_time.c
   trunk/iptables/extensions/libxt_tos.c
   trunk/iptables/extensions/libxt_u32.c
   trunk/iptables/extensions/libxt_udp.c
   trunk/iptables/extensions/tos_values.c
   trunk/iptables/include/libiptc/libip6tc.h
   trunk/iptables/include/libiptc/libiptc.h
   trunk/iptables/ip6tables.c
   trunk/iptables/iptables-xml.c
   trunk/iptables/xtables.c
Log:
[PATCH]: fix gcc warnings

Max Kellermann <max at duempel.org>


Modified: trunk/iptables/configure.ac
===================================================================
--- trunk/iptables/configure.ac	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/configure.ac	2008-01-29 13:48:05 UTC (rev 7306)
@@ -37,7 +37,7 @@
 AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" == "yes"])
 
 regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
-	-D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \
+	-D_REENTRANT -W -Wall -Waggregate-return -Wmissing-declarations \
 	-Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
 	-Winline -pipe -DIPTABLES_VERSION=\\\"$PACKAGE_VERSION\\\" \
 	-DIPT_LIB_DIR=\\\"\${iptdir}\\\" -DIP6T_LIB_DIR=\\\"\${iptdir}\\\"";
@@ -46,7 +46,8 @@
 # Remove workarounds soon
 regular_CFLAGS="$regular_CFLAGS -Wno-aggregate-return \
 	-Wno-missing-declarations -Wno-missing-prototypes \
-	-Wno-redundant-decls -Wno-shadow -Wno-strict-prototypes -Wno-inline"
+        -Wno-unused-parameter \
+	-Wno-shadow -Wno-inline"
 
 AC_SUBST([regular_CFLAGS kinclude_CFLAGS])
 AC_SUBST([kbuilddir])

Modified: trunk/iptables/extensions/dscp_helper.c
===================================================================
--- trunk/iptables/extensions/dscp_helper.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/dscp_helper.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -49,7 +49,7 @@
 static unsigned int
 class_to_dscp(const char *name)
 {
-	int i;
+	unsigned i;
 
 	for (i = 0; i < sizeof(ds_classes) / sizeof(struct ds_class); i++) {
 		if (!strncasecmp(name, ds_classes[i].name,

Modified: trunk/iptables/extensions/libip6t_HL.c
===================================================================
--- trunk/iptables/extensions/libip6t_HL.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_HL.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -136,7 +136,7 @@
 	{ "hl-set", 1, NULL, '1' },
 	{ "hl-dec", 1, NULL, '2' },
 	{ "hl-inc", 1, NULL, '3' },
-	{ }
+	{ .name = NULL }
 };
 
 static struct ip6tables_target hl_target6 = {

Modified: trunk/iptables/extensions/libip6t_LOG.c
===================================================================
--- trunk/iptables/extensions/libip6t_LOG.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_LOG.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -38,7 +38,7 @@
 	{ .name = "log-tcp-options",  .has_arg = 0, .val = '2' },
 	{ .name = "log-ip-options",   .has_arg = 0, .val = '3' },
 	{ .name = "log-uid",          .has_arg = 0, .val = '4' },
-	{ }
+	{ .name = NULL }
 };
 
 /* Initialize the target. */

Modified: trunk/iptables/extensions/libip6t_REJECT.c
===================================================================
--- trunk/iptables/extensions/libip6t_REJECT.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_REJECT.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -66,7 +66,7 @@
 
 static const struct option REJECT_opts[] = {
 	{ "reject-with", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 /* Allocate and initialize the target. */

Modified: trunk/iptables/extensions/libip6t_ah.c
===================================================================
--- trunk/iptables/extensions/libip6t_ah.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_ah.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -23,7 +23,7 @@
 	{ .name = "ahspi", .has_arg = 1, .val = '1' },
 	{ .name = "ahlen", .has_arg = 1, .val = '2' },
 	{ .name = "ahres", .has_arg = 0, .val = '3' },
-	{ }
+	{ .name = NULL }
 };
 
 static u_int32_t

Modified: trunk/iptables/extensions/libip6t_dst.c
===================================================================
--- trunk/iptables/extensions/libip6t_dst.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_dst.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -26,7 +26,7 @@
 	{ .name = "dst-len",        .has_arg = 1, .val = '1' },
 	{ .name = "dst-opts",       .has_arg = 1, .val = '2' },
 	{ .name = "dst-not-strict", .has_arg = 1, .val = '3' },
-	{ }
+	{ .name = NULL }
 };
 
 static u_int32_t
@@ -168,7 +168,7 @@
 }
 
 static void
-print_options(int optsnr, u_int16_t *optsp)
+print_options(unsigned optsnr, u_int16_t *optsp)
 {
 	unsigned int i;
 

Modified: trunk/iptables/extensions/libip6t_frag.c
===================================================================
--- trunk/iptables/extensions/libip6t_frag.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_frag.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -29,7 +29,7 @@
 	{ .name = "fragfirst", .has_arg = 0, .val = '4' },
 	{ .name = "fragmore",  .has_arg = 0, .val = '5' },
 	{ .name = "fraglast",  .has_arg = 0, .val = '6' },
-	{ }
+	{ .name = NULL }
 };
 
 static u_int32_t

Modified: trunk/iptables/extensions/libip6t_hbh.c
===================================================================
--- trunk/iptables/extensions/libip6t_hbh.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_hbh.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -29,7 +29,7 @@
 	{ "hbh-len", 1, NULL, '1' },
 	{ "hbh-opts", 1, NULL, '2' },
 	{ "hbh-not-strict", 1, NULL, '3' },
-	{ }
+	{ .name = NULL }
 };
 
 static u_int32_t
@@ -162,7 +162,7 @@
 }
 
 static void
-print_options(int optsnr, u_int16_t *optsp)
+print_options(unsigned optsnr, u_int16_t *optsp)
 {
 	unsigned int i;
 

Modified: trunk/iptables/extensions/libip6t_hl.c
===================================================================
--- trunk/iptables/extensions/libip6t_hl.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_hl.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -122,7 +122,7 @@
 	{ .name = "hl-eq", .has_arg = 1, .val = '2' },
 	{ .name = "hl-lt", .has_arg = 1, .val = '3' },
 	{ .name = "hl-gt", .has_arg = 1, .val = '4' },
-	{ }
+	{ .name = NULL }
 };
 
 static struct ip6tables_match hl_match6 = {

Modified: trunk/iptables/extensions/libip6t_icmp6.c
===================================================================
--- trunk/iptables/extensions/libip6t_icmp6.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_icmp6.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -86,7 +86,7 @@
 
 static const struct option icmp6_opts[] = {
 	{ "icmpv6-type", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/libip6t_ipv6header.c
===================================================================
--- trunk/iptables/extensions/libip6t_ipv6header.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_ipv6header.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -150,7 +150,7 @@
 static const struct option ipv6header_opts[] = {
 	{ "header", 1, NULL, '1' },
 	{ "soft", 0, NULL, '2' },
-	{ }
+	{ .name = NULL }
 };
 
 static void ipv6header_init(struct xt_entry_match *m)

Modified: trunk/iptables/extensions/libip6t_mh.c
===================================================================
--- trunk/iptables/extensions/libip6t_mh.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_mh.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -220,7 +220,7 @@
 
 static const struct option mh_opts[] = {
 	{ "mh-type", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 static struct ip6tables_match mh_match6 = {

Modified: trunk/iptables/extensions/libip6t_policy.c
===================================================================
--- trunk/iptables/extensions/libip6t_policy.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_policy.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -91,7 +91,7 @@
 		.name		= "next",
 		.val		= 'a'
 	},
-	{ }
+	{ .name = NULL }
 };
 
 /* FIXME - Duplicated code from ip6tables.c */

Modified: trunk/iptables/extensions/libip6t_rt.c
===================================================================
--- trunk/iptables/extensions/libip6t_rt.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libip6t_rt.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -35,7 +35,7 @@
 	{ "rt-0-res", 0, NULL, '4' },
 	{ "rt-0-addrs", 1, NULL, '5' },
 	{ "rt-0-not-strict", 0, NULL, '6' },
-	{ }
+	{ .name = NULL }
 };
 
 static u_int32_t
@@ -255,7 +255,7 @@
 }
 
 static void
-print_addresses(int addrnr, struct in6_addr *addrp)
+print_addresses(unsigned addrnr, struct in6_addr *addrp)
 {
 	unsigned int i;
 

Modified: trunk/iptables/extensions/libipt_CLUSTERIP.c
===================================================================
--- trunk/iptables/extensions/libipt_CLUSTERIP.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_CLUSTERIP.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -50,7 +50,7 @@
 	{ "total-nodes", 1, NULL, '4' },
 	{ "local-node", 1, NULL, '5' },
 	{ "hash-init", 1, NULL, '6' },
-	{ }
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/libipt_DNAT.c
===================================================================
--- trunk/iptables/extensions/libipt_DNAT.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_DNAT.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -34,7 +34,7 @@
 static const struct option DNAT_opts[] = {
 	{ "to-destination", 1, NULL, '1' },
 	{ "random", 0, NULL, '2' },
-	{ }
+	{ .name = NULL }
 };
 
 static struct ipt_natinfo *

Modified: trunk/iptables/extensions/libipt_ECN.c
===================================================================
--- trunk/iptables/extensions/libipt_ECN.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_ECN.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -38,7 +38,7 @@
 	{ "ecn-tcp-cwr", 1, NULL, 'G' },
 	{ "ecn-tcp-ece", 1, NULL, 'H' },
 	{ "ecn-ip-ect", 1, NULL, '9' },
-	{ }
+	{ .name = NULL }
 };
 
 static int ECN_parse(int c, char **argv, int invert, unsigned int *flags,

Modified: trunk/iptables/extensions/libipt_LOG.c
===================================================================
--- trunk/iptables/extensions/libipt_LOG.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_LOG.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -38,7 +38,7 @@
 	{ .name = "log-tcp-options",  .has_arg = 0, .val = '2' },
 	{ .name = "log-ip-options",   .has_arg = 0, .val = '3' },
 	{ .name = "log-uid",          .has_arg = 0, .val = '4' },
-	{ }
+	{ .name = NULL }
 };
 
 /* Initialize the target. */

Modified: trunk/iptables/extensions/libipt_MASQUERADE.c
===================================================================
--- trunk/iptables/extensions/libipt_MASQUERADE.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_MASQUERADE.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -25,7 +25,7 @@
 static const struct option MASQUERADE_opts[] = {
 	{ "to-ports", 1, NULL, '1' },
 	{ "random", 0, NULL, '2' },
-	{ }
+	{ .name = NULL }
 };
 
 /* Initialize the target. */

Modified: trunk/iptables/extensions/libipt_NETMAP.c
===================================================================
--- trunk/iptables/extensions/libipt_NETMAP.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_NETMAP.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -15,7 +15,7 @@
 
 static const struct option NETMAP_opts[] = {
 	{ "to", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 /* Function which prints out usage message. */

Modified: trunk/iptables/extensions/libipt_REDIRECT.c
===================================================================
--- trunk/iptables/extensions/libipt_REDIRECT.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_REDIRECT.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -24,7 +24,7 @@
 static const struct option REDIRECT_opts[] = {
 	{ "to-ports", 1, NULL, '1' },
 	{ "random", 0, NULL, '2' },
-	{ }
+	{ .name = NULL }
 };
 
 /* Initialize the target. */

Modified: trunk/iptables/extensions/libipt_REJECT.c
===================================================================
--- trunk/iptables/extensions/libipt_REJECT.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_REJECT.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -81,7 +81,7 @@
 
 static const struct option REJECT_opts[] = {
 	{ "reject-with", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 /* Allocate and initialize the target. */

Modified: trunk/iptables/extensions/libipt_SAME.c
===================================================================
--- trunk/iptables/extensions/libipt_SAME.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_SAME.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -32,7 +32,7 @@
 	{ "to", 1, NULL, '1' },
 	{ "nodst", 0, NULL, '2'},
 	{ "random", 0, NULL, '3' },
-	{ }
+	{ .name = NULL }
 };
 
 /* Initialize the target. */
@@ -90,7 +90,7 @@
 {
 	struct ipt_same_info *mr
 		= (struct ipt_same_info *)(*target)->data;
-	int count;
+	unsigned count;
 
 	switch (c) {
 	case '1':
@@ -146,7 +146,7 @@
 static void SAME_print(const void *ip, const struct xt_entry_target *target,
                        int numeric)
 {
-	int count;
+	unsigned count;
 	struct ipt_same_info *mr
 		= (struct ipt_same_info *)target->data;
 	int random = 0;
@@ -180,7 +180,7 @@
 /* Saves the union ipt_targinfo in parsable form to stdout. */
 static void SAME_save(const void *ip, const struct xt_entry_target *target)
 {
-	int count;
+	unsigned count;
 	struct ipt_same_info *mr
 		= (struct ipt_same_info *)target->data;
 	int random = 0;

Modified: trunk/iptables/extensions/libipt_SNAT.c
===================================================================
--- trunk/iptables/extensions/libipt_SNAT.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_SNAT.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -34,7 +34,7 @@
 static const struct option SNAT_opts[] = {
 	{ "to-source", 1, NULL, '1' },
 	{ "random", 0, NULL, '2' },
-	{ }
+	{ .name = NULL }
 };
 
 static struct ipt_natinfo *

Modified: trunk/iptables/extensions/libipt_TTL.c
===================================================================
--- trunk/iptables/extensions/libipt_TTL.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_TTL.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -136,7 +136,7 @@
 	{ "ttl-set", 1, NULL, '1' },
 	{ "ttl-dec", 1, NULL, '2' },
 	{ "ttl-inc", 1, NULL, '3' },
-	{ }
+	{ .name = NULL }
 };
 
 static struct iptables_target ttl_target = {

Modified: trunk/iptables/extensions/libipt_ULOG.c
===================================================================
--- trunk/iptables/extensions/libipt_ULOG.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_ULOG.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -49,7 +49,7 @@
 	{"ulog-prefix", 1, NULL, '#'},
 	{"ulog-cprange", 1, NULL, 'A'},
 	{"ulog-qthreshold", 1, NULL, 'B'},
-	{ }
+	{ .name = NULL }
 };
 
 /* Initialize the target. */

Modified: trunk/iptables/extensions/libipt_addrtype.c
===================================================================
--- trunk/iptables/extensions/libipt_addrtype.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_addrtype.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -180,7 +180,7 @@
 static const struct option addrtype_opts[] = {
 	{ "src-type", 1, NULL, '1' },
 	{ "dst-type", 1, NULL, '2' },
-	{ }
+	{ .name = NULL }
 };
 
 static struct iptables_match addrtype_match = {

Modified: trunk/iptables/extensions/libipt_ah.c
===================================================================
--- trunk/iptables/extensions/libipt_ah.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_ah.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -20,7 +20,7 @@
 
 static const struct option ah_opts[] = {
 	{ "ahspi", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 static u_int32_t

Modified: trunk/iptables/extensions/libipt_ecn.c
===================================================================
--- trunk/iptables/extensions/libipt_ecn.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_ecn.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -30,7 +30,7 @@
 	{ .name = "ecn-tcp-cwr", .has_arg = 0, .val = 'F' },
 	{ .name = "ecn-tcp-ece", .has_arg = 0, .val = 'G' },
 	{ .name = "ecn-ip-ect",  .has_arg = 1, .val = 'H' },
-	{ }
+	{ .name = NULL }
 };
 
 static int ecn_parse(int c, char **argv, int invert, unsigned int *flags,

Modified: trunk/iptables/extensions/libipt_icmp.c
===================================================================
--- trunk/iptables/extensions/libipt_icmp.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_icmp.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -110,7 +110,7 @@
 
 static const struct option icmp_opts[] = {
 	{ "icmp-type", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 static void 

Modified: trunk/iptables/extensions/libipt_policy.c
===================================================================
--- trunk/iptables/extensions/libipt_policy.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_policy.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -90,7 +90,7 @@
 		.name		= "next",
 		.val		= 'a'
 	},
-	{ }
+	{ .name = NULL }
 };
 
 static int parse_direction(char *s)

Modified: trunk/iptables/extensions/libipt_realm.c
===================================================================
--- trunk/iptables/extensions/libipt_realm.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_realm.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -26,7 +26,7 @@
 
 static const struct option realm_opts[] = {
 	{ "realm", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 struct realmname { 

Modified: trunk/iptables/extensions/libipt_recent.c
===================================================================
--- trunk/iptables/extensions/libipt_recent.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_recent.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -33,7 +33,7 @@
 	{ .name = "name",     .has_arg = 1, .val = 208 },
 	{ .name = "rsource",  .has_arg = 0, .val = 209 },
 	{ .name = "rdest",    .has_arg = 0, .val = 210 },
-	{ }
+	{ .name = NULL }
 };
 
 /* Function which prints out usage message. */

Modified: trunk/iptables/extensions/libipt_ttl.c
===================================================================
--- trunk/iptables/extensions/libipt_ttl.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libipt_ttl.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -145,7 +145,7 @@
 	{ "ttl-eq", 1, NULL, '2'},
 	{ "ttl-lt", 1, NULL, '3'},
 	{ "ttl-gt", 1, NULL, '4'},
-	{ }
+	{ .name = NULL }
 };
 
 static struct iptables_match ttl_match = {

Modified: trunk/iptables/extensions/libxt_CLASSIFY.c
===================================================================
--- trunk/iptables/extensions/libxt_CLASSIFY.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_CLASSIFY.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -23,7 +23,7 @@
 
 static const struct option CLASSIFY_opts[] = {
 	{ "set-class", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 static int CLASSIFY_string_to_priority(const char *s, unsigned int *p)

Modified: trunk/iptables/extensions/libxt_CONNMARK.c
===================================================================
--- trunk/iptables/extensions/libxt_CONNMARK.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_CONNMARK.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -50,7 +50,7 @@
 	{ "save-mark", 0, NULL, '2' },
 	{ "restore-mark", 0, NULL, '3' },
 	{ "mask", 1, NULL, '4' },
-	{ }
+	{ .name = NULL }
 };
 
 static const struct option connmark_tg_opts[] = {
@@ -64,7 +64,7 @@
 	{.name = "ctmask",        .has_arg = true,  .val = 'c'},
 	{.name = "nfmask",        .has_arg = true,  .val = 'n'},
 	{.name = "mask",          .has_arg = true,  .val = 'm'},
-	{},
+	{.name = NULL},
 };
 
 static void connmark_tg_help(void)

Modified: trunk/iptables/extensions/libxt_CONNSECMARK.c
===================================================================
--- trunk/iptables/extensions/libxt_CONNSECMARK.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_CONNSECMARK.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -27,7 +27,7 @@
 static const struct option CONNSECMARK_opts[] = {
 	{ "save", 0, 0, '1' },
 	{ "restore", 0, 0, '2' },
-	{ 0 }
+	{ .name = NULL }
 };
 
 static int

Modified: trunk/iptables/extensions/libxt_DSCP.c
===================================================================
--- trunk/iptables/extensions/libxt_DSCP.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_DSCP.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -40,7 +40,7 @@
 static const struct option DSCP_opts[] = {
 	{ "set-dscp", 1, NULL, 'F' },
 	{ "set-dscp-class", 1, NULL, 'G' },
-	{ }
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/libxt_MARK.c
===================================================================
--- trunk/iptables/extensions/libxt_MARK.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_MARK.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -29,7 +29,7 @@
 	{ "set-mark", 1, NULL, '1' },
 	{ "and-mark", 1, NULL, '2' },
 	{ "or-mark", 1, NULL, '3' },
-	{ }
+	{ .name = NULL }
 };
 
 static const struct option mark_tg_opts[] = {
@@ -38,7 +38,7 @@
 	{.name = "and-mark",  .has_arg = true, .val = '&'},
 	{.name = "or-mark",   .has_arg = true, .val = '|'},
 	{.name = "xor-mark",  .has_arg = true, .val = '^'},
-	{},
+	{ .name = NULL }
 };
 
 static void mark_tg_help(void)

Modified: trunk/iptables/extensions/libxt_NFLOG.c
===================================================================
--- trunk/iptables/extensions/libxt_NFLOG.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_NFLOG.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -19,7 +19,7 @@
 	{ "nflog-prefix",    1, NULL, NFLOG_PREFIX },
 	{ "nflog-range",     1, NULL, NFLOG_RANGE },
 	{ "nflog-threshold", 1, NULL, NFLOG_THRESHOLD },
-	{NULL},
+	{ .name = NULL }
 };
 
 static void NFLOG_help(void)

Modified: trunk/iptables/extensions/libxt_NFQUEUE.c
===================================================================
--- trunk/iptables/extensions/libxt_NFQUEUE.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_NFQUEUE.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -25,7 +25,7 @@
 
 static const struct option NFQUEUE_opts[] = {
 	{ "queue-num", 1, NULL, 'F' },
-	{ }
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/libxt_RATEEST.c
===================================================================
--- trunk/iptables/extensions/libxt_RATEEST.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_RATEEST.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -36,7 +36,7 @@
 	{ "rateest-name",	1, NULL, RATEEST_OPT_NAME },
 	{ "rateest-interval",	1, NULL, RATEEST_OPT_INTERVAL },
 	{ "rateest-ewmalog",	1, NULL, RATEEST_OPT_EWMALOG },
-	{ },
+	{ .name = NULL },
 };
 
 /* Copied from iproute */

Modified: trunk/iptables/extensions/libxt_SECMARK.c
===================================================================
--- trunk/iptables/extensions/libxt_SECMARK.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_SECMARK.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -25,7 +25,7 @@
 
 static const struct option SECMARK_opts[] = {
 	{ "selctx", 1, 0, '1' },
-	{ 0 }
+	{ .name = NULL }
 };
 
 /*

Modified: trunk/iptables/extensions/libxt_TCPMSS.c
===================================================================
--- trunk/iptables/extensions/libxt_TCPMSS.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_TCPMSS.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -39,7 +39,7 @@
 static const struct option TCPMSS_opts[] = {
 	{ "set-mss", 1, NULL, '1' },
 	{ "clamp-mss-to-pmtu", 0, NULL, '2' },
-	{ }
+	{ .name = NULL }
 };
 
 /* Function which parses command options; returns true if it

Modified: trunk/iptables/extensions/libxt_TCPOPTSTRIP.c
===================================================================
--- trunk/iptables/extensions/libxt_TCPOPTSTRIP.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_TCPOPTSTRIP.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -22,12 +22,12 @@
 
 struct tcp_optionmap {
 	const char *name, *desc;
-	const int option;
+	const unsigned option;
 };
 
 static const struct option tcpoptstrip_tg_opts[] = {
 	{.name = "strip-options", .has_arg = true, .val = 's'},
-	{},
+	{ .name = NULL }
 };
 
 static const struct tcp_optionmap tcp_optionmap[] = {
@@ -37,7 +37,7 @@
 	{"sack",           "Selective ACK",        TCPOPT_SACK},
 	{"timestamp",      "Timestamp",            TCPOPT_TIMESTAMP},
 	{"md5",            "MD5 signature",        TCPOPT_MD5SIG},
-	{NULL},
+	{ .name = NULL }
 };
 
 static void tcpoptstrip_tg_help(void)

Modified: trunk/iptables/extensions/libxt_TOS.c
===================================================================
--- trunk/iptables/extensions/libxt_TOS.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_TOS.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -20,7 +20,7 @@
 
 static const struct option tos_tg_opts_v0[] = {
 	{.name = "set-tos", .has_arg = true, .val = '='},
-	{},
+	{ .name = NULL }
 };
 
 static const struct option tos_tg_opts[] = {
@@ -28,7 +28,7 @@
 	{.name = "and-tos", .has_arg = true, .val = '&'},
 	{.name = "or-tos",  .has_arg = true, .val = '|'},
 	{.name = "xor-tos", .has_arg = true, .val = '^'},
-	{},
+	{ .name = NULL }
 };
 
 static void tos_tg_help_v0(void)

Modified: trunk/iptables/extensions/libxt_comment.c
===================================================================
--- trunk/iptables/extensions/libxt_comment.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_comment.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -25,7 +25,7 @@
 
 static const struct option comment_opts[] = {
 	{ "comment", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/libxt_connbytes.c
===================================================================
--- trunk/iptables/extensions/libxt_connbytes.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_connbytes.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -23,7 +23,7 @@
 	{ "connbytes", 1, NULL, '1' },
 	{ "connbytes-dir", 1, NULL, '2' },
 	{ "connbytes-mode", 1, NULL, '3' },
-	{ }
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/libxt_connlimit.c
===================================================================
--- trunk/iptables/extensions/libxt_connlimit.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_connlimit.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -21,7 +21,7 @@
 static const struct option connlimit_opts[] = {
 	{"connlimit-above", 1, NULL, 'A'},
 	{"connlimit-mask",  1, NULL, 'M'},
-	{NULL},
+	{ .name = NULL }
 };
 
 static void connlimit_init(struct xt_entry_match *match)

Modified: trunk/iptables/extensions/libxt_connmark.c
===================================================================
--- trunk/iptables/extensions/libxt_connmark.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_connmark.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -42,7 +42,7 @@
 
 static const struct option connmark_mt_opts[] = {
 	{.name = "mark", .has_arg = true, .val = '1'},
-	{},
+	{ .name = NULL }
 };
 
 static int

Modified: trunk/iptables/extensions/libxt_conntrack.c
===================================================================
--- trunk/iptables/extensions/libxt_conntrack.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_conntrack.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -57,7 +57,7 @@
 	{.name = "ctrepldst", .has_arg = true, .val = '6'},
 	{.name = "ctstatus",  .has_arg = true, .val = '7'},
 	{.name = "ctexpire",  .has_arg = true, .val = '8'},
-	{},
+	{ .name = NULL }
 };
 
 static const struct option conntrack_mt_opts[] = {
@@ -74,7 +74,7 @@
 	{.name = "ctreplsrcport", .has_arg = true, .val = 'c'},
 	{.name = "ctrepldstport", .has_arg = true, .val = 'd'},
 	{.name = "ctdir",         .has_arg = true, .val = 'e'},
-	{},
+	{.name = NULL},
 };
 
 static int
@@ -250,7 +250,9 @@
 		cp++;
 
 		sinfo->expires_min = buffer[0] ? parse_expire(buffer) : 0;
-		sinfo->expires_max = cp[0] ? parse_expire(cp) : -1;
+		sinfo->expires_max = cp[0]
+			? parse_expire(cp)
+			: (unsigned long)-1;
 	}
 	free(buffer);
 

Modified: trunk/iptables/extensions/libxt_dccp.c
===================================================================
--- trunk/iptables/extensions/libxt_dccp.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_dccp.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -51,7 +51,7 @@
 	{ .name = "dport", .has_arg = 1, .val = '2' },
 	{ .name = "dccp-types", .has_arg = 1, .val = '3' },
 	{ .name = "dccp-option", .has_arg = 1, .val = '4' },
-	{ }
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/libxt_dscp.c
===================================================================
--- trunk/iptables/extensions/libxt_dscp.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_dscp.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -42,7 +42,7 @@
 static const struct option dscp_opts[] = {
 	{ "dscp", 1, NULL, 'F' },
 	{ "dscp-class", 1, NULL, 'G' },
-	{ }
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/libxt_esp.c
===================================================================
--- trunk/iptables/extensions/libxt_esp.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_esp.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -20,7 +20,7 @@
 
 static const struct option esp_opts[] = {
 	{ "espspi", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 static u_int32_t

Modified: trunk/iptables/extensions/libxt_hashlimit.c
===================================================================
--- trunk/iptables/extensions/libxt_hashlimit.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_hashlimit.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -54,7 +54,7 @@
 	{ "hashlimit-htable-expire", 1, NULL, ')' },
 	{ "hashlimit-mode", 1, NULL, '_' },
 	{ "hashlimit-name", 1, NULL, '"' },
-	{ }
+	{ .name = NULL }
 };
 
 static

Modified: trunk/iptables/extensions/libxt_helper.c
===================================================================
--- trunk/iptables/extensions/libxt_helper.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_helper.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -20,7 +20,7 @@
 
 static const struct option helper_opts[] = {
 	{ "helper", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 /* Function which parses command options; returns true if it

Modified: trunk/iptables/extensions/libxt_iprange.c
===================================================================
--- trunk/iptables/extensions/libxt_iprange.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_iprange.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -27,7 +27,7 @@
 static const struct option iprange_mt_opts[] = {
 	{.name = "src-range", .has_arg = true, .val = '1'},
 	{.name = "dst-range", .has_arg = true, .val = '2'},
-	{},
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/libxt_length.c
===================================================================
--- trunk/iptables/extensions/libxt_length.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_length.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -21,7 +21,7 @@
   
 static const struct option length_opts[] = {
 	{ "length", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 static u_int16_t

Modified: trunk/iptables/extensions/libxt_limit.c
===================================================================
--- trunk/iptables/extensions/libxt_limit.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_limit.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -32,7 +32,7 @@
 static const struct option limit_opts[] = {
 	{ "limit", 1, NULL, '%' },
 	{ "limit-burst", 1, NULL, '$' },
-	{ }
+	{ .name = NULL }
 };
 
 static

Modified: trunk/iptables/extensions/libxt_mac.c
===================================================================
--- trunk/iptables/extensions/libxt_mac.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_mac.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -24,7 +24,7 @@
 
 static const struct option mac_opts[] = {
 	{ "mac-source", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/libxt_mark.c
===================================================================
--- trunk/iptables/extensions/libxt_mark.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_mark.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -23,7 +23,7 @@
 
 static const struct option mark_mt_opts[] = {
 	{.name = "mark", .has_arg = true, .val = '1'},
-	{},
+	{ .name = NULL }
 };
 
 static int mark_mt_parse(int c, char **argv, int invert, unsigned int *flags,

Modified: trunk/iptables/extensions/libxt_multiport.c
===================================================================
--- trunk/iptables/extensions/libxt_multiport.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_multiport.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -49,7 +49,7 @@
 	{ "destination-ports", 1, NULL, '2' },
 	{ "dports", 1, NULL, '2' }, /* synonym */
 	{ "ports", 1, NULL, '3' },
-	{ }
+	{ .name = NULL }
 };
 
 static char *

Modified: trunk/iptables/extensions/libxt_owner.c
===================================================================
--- trunk/iptables/extensions/libxt_owner.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_owner.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -81,7 +81,7 @@
 #ifdef IPT_OWNER_COMM
 	{.name = "cmd-owner", .has_arg = true, .val = 'c'},
 #endif
-	{},
+	{ .name = NULL }
 };
 
 static const struct option owner_mt6_opts_v0[] = {
@@ -89,14 +89,14 @@
 	{.name = "gid-owner", .has_arg = true, .val = 'g'},
 	{.name = "pid-owner", .has_arg = true, .val = 'p'},
 	{.name = "sid-owner", .has_arg = true, .val = 's'},
-	{},
+	{ .name = NULL }
 };
 
 static const struct option owner_mt_opts[] = {
 	{.name = "uid-owner",     .has_arg = true,  .val = 'u'},
 	{.name = "gid-owner",     .has_arg = true,  .val = 'g'},
 	{.name = "socket-exists", .has_arg = false, .val = 'k'},
-	{},
+	{ .name = NULL }
 };
 
 static int

Modified: trunk/iptables/extensions/libxt_physdev.c
===================================================================
--- trunk/iptables/extensions/libxt_physdev.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_physdev.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -30,7 +30,7 @@
 	{ "physdev-is-in", 0, NULL, '3' },
 	{ "physdev-is-out", 0, NULL, '4' },
 	{ "physdev-is-bridged", 0, NULL, '5' },
-	{ }
+	{ .name = NULL }
 };
 
 static int

Modified: trunk/iptables/extensions/libxt_pkttype.c
===================================================================
--- trunk/iptables/extensions/libxt_pkttype.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_pkttype.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -66,7 +66,7 @@
 
 static const struct option pkttype_opts[] = {
 	{"pkt-type", 1, NULL, '1'},
-	{ }
+	{ .name = NULL }
 };
 
 static void parse_pkttype(const char *pkttype, struct xt_pkttype_info *info)

Modified: trunk/iptables/extensions/libxt_quota.c
===================================================================
--- trunk/iptables/extensions/libxt_quota.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_quota.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -13,7 +13,7 @@
 
 static const struct option quota_opts[] = {
 	{"quota", 1, NULL, '1'},
-	{ }
+	{ .name = NULL }
 };
 
 /* print usage */
@@ -49,7 +49,7 @@
 	printf("Quota: %llu\n", *quota);
 #endif
 
-	if (*quota == -1)
+	if (*quota == (u_int64_t)-1)
 		exit_error(PARAMETER_PROBLEM, "quota invalid: '%s'\n", s);
 	else
 		return 1;

Modified: trunk/iptables/extensions/libxt_rateest.c
===================================================================
--- trunk/iptables/extensions/libxt_rateest.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_rateest.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -55,7 +55,7 @@
 	{ "rateest-lt",		0, NULL, OPT_RATEEST_LT },
 	{ "rateest-gt",		0, NULL, OPT_RATEEST_GT },
 	{ "rateest-eq",		0, NULL, OPT_RATEEST_EQ },
-	{ },
+	{ .name = NULL }
 };
 
 /* Copied from iproute. See http://physics.nist.gov/cuu/Units/binary.html */
@@ -81,7 +81,7 @@
 	{ "GBps",	8000000000. },
 	{ "TiBps",	8.*1024.*1024.*1024.*1024. },
 	{ "TBps",	8000000000000. },
-	{ }
+	{ .name = NULL }
 };
 
 static int

Modified: trunk/iptables/extensions/libxt_sctp.c
===================================================================
--- trunk/iptables/extensions/libxt_sctp.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_sctp.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -73,7 +73,7 @@
 	{ .name = "destination-port", .has_arg = 1, .val = '2' },
 	{ .name = "dport", .has_arg = 1, .val = '2' },
 	{ .name = "chunk-types", .has_arg = 1, .val = '3' },
-	{ }
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/libxt_state.c
===================================================================
--- trunk/iptables/extensions/libxt_state.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_state.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -25,7 +25,7 @@
 
 static const struct option state_opts[] = {
 	{ "state", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 static int

Modified: trunk/iptables/extensions/libxt_statistic.c
===================================================================
--- trunk/iptables/extensions/libxt_statistic.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_statistic.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -27,7 +27,7 @@
 	{ "probability", 1, NULL, '2' },
 	{ "every", 1, NULL, '3' },
 	{ "packet", 1, NULL, '4' },
-	{ }
+	{ .name = NULL }
 };
 
 static struct xt_statistic_info *info;
@@ -113,7 +113,7 @@
 		exit_error(PARAMETER_PROBLEM,
 			   "--packet can only be used with --every");
 	/* at this point, info->u.nth.every have been decreased. */
-	if (!(info->u.nth.packet >= 0 && info->u.nth.packet <= info->u.nth.every))
+	if (info->u.nth.packet > info->u.nth.every)
 		exit_error(PARAMETER_PROBLEM,
 			  "the --packet p must be 0 <= p <= n-1");
 

Modified: trunk/iptables/extensions/libxt_string.c
===================================================================
--- trunk/iptables/extensions/libxt_string.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_string.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -49,7 +49,7 @@
 	{ "algo", 1, NULL, '3' },
 	{ "string", 1, NULL, '4' },
 	{ "hex-string", 1, NULL, '5' },
-	{ }
+	{ .name = NULL }
 };
 
 static void string_init(struct xt_entry_match *m)

Modified: trunk/iptables/extensions/libxt_tcp.c
===================================================================
--- trunk/iptables/extensions/libxt_tcp.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_tcp.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -34,7 +34,7 @@
 	{ "syn", 0, NULL, '3' },
 	{ "tcp-flags", 1, NULL, '4' },
 	{ "tcp-option", 1, NULL, '5' },
-	{ }
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/libxt_tcpmss.c
===================================================================
--- trunk/iptables/extensions/libxt_tcpmss.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_tcpmss.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -20,7 +20,7 @@
 
 static const struct option tcpmss_opts[] = {
 	{ "mss", 1, NULL, '1' },
-	{ }
+	{ .name = NULL }
 };
 
 static u_int16_t

Modified: trunk/iptables/extensions/libxt_time.c
===================================================================
--- trunk/iptables/extensions/libxt_time.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_time.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -44,7 +44,7 @@
 	{"monthdays", true,  NULL, 'm'},
 	{"localtz",   false, NULL, 'l'},
 	{"utc",       false, NULL, 'u'},
-	{NULL},
+	{ .name = NULL }
 };
 
 static void time_help(void)

Modified: trunk/iptables/extensions/libxt_tos.c
===================================================================
--- trunk/iptables/extensions/libxt_tos.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_tos.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -22,7 +22,7 @@
 
 static const struct option tos_mt_opts[] = {
 	{.name = "tos", .has_arg = true, .val = 't'},
-	{},
+	{ .name = NULL }
 };
 
 static void tos_mt_help(void)

Modified: trunk/iptables/extensions/libxt_u32.c
===================================================================
--- trunk/iptables/extensions/libxt_u32.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_u32.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -24,7 +24,7 @@
 
 static const struct option u32_opts[] = {
 	{"u32", 1, NULL, 'u'},
-	{NULL},
+	{ .name = NULL }
 };
 
 static void u32_help(void)

Modified: trunk/iptables/extensions/libxt_udp.c
===================================================================
--- trunk/iptables/extensions/libxt_udp.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/libxt_udp.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -26,7 +26,7 @@
 	{ "sport", 1, NULL, '1' }, /* synonym */
 	{ "destination-port", 1, NULL, '2' },
 	{ "dport", 1, NULL, '2' }, /* synonym */
-	{ }
+	{ .name = NULL }
 };
 
 static void

Modified: trunk/iptables/extensions/tos_values.c
===================================================================
--- trunk/iptables/extensions/tos_values.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/extensions/tos_values.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -15,7 +15,7 @@
 	{IPTOS_RELIABILITY, "Maximize-Reliability"},
 	{IPTOS_MINCOST,     "Minimize-Cost"},
 	{IPTOS_NORMALSVC,   "Normal-Service"},
-	{},
+	{ .name = NULL }
 };
 
 /*

Modified: trunk/iptables/include/libiptc/libip6tc.h
===================================================================
--- trunk/iptables/include/libiptc/libip6tc.h	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/include/libiptc/libip6tc.h	2008-01-29 13:48:05 UTC (rev 7306)
@@ -144,7 +144,7 @@
 int ip6tc_commit(ip6tc_handle_t *handle);
 
 /* Get raw socket. */
-int ip6tc_get_raw_socket();
+int ip6tc_get_raw_socket(void);
 
 /* Translates errno numbers into more human-readable form than strerror. */
 const char *ip6tc_strerror(int err);

Modified: trunk/iptables/include/libiptc/libiptc.h
===================================================================
--- trunk/iptables/include/libiptc/libiptc.h	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/include/libiptc/libiptc.h	2008-01-29 13:48:05 UTC (rev 7306)
@@ -154,7 +154,7 @@
 int iptc_commit(iptc_handle_t *handle);
 
 /* Get raw socket. */
-int iptc_get_raw_socket();
+int iptc_get_raw_socket(void);
 
 /* Translates errno numbers into more human-readable form than strerror. */
 const char *iptc_strerror(int err);

Modified: trunk/iptables/ip6tables.c
===================================================================
--- trunk/iptables/ip6tables.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/ip6tables.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -1177,6 +1177,7 @@
 	struct in6_addr *saddrs = NULL, *daddrs = NULL;
 
 	int c, verbose = 0;
+	unsigned i;
 	const char *chain = NULL;
 	const char *shostnetworkmask = NULL, *dhostnetworkmask = NULL;
 	const char *policy = NULL, *newname = NULL;
@@ -1825,11 +1826,11 @@
 		e = NULL;
 	}
 
-	for (c = 0; c < nsaddrs; c++)
-		free(&saddrs[c]);
+	for (i = 0; i < nsaddrs; i++)
+		free(&saddrs[i]);
 
-	for (c = 0; c < ndaddrs; c++)
-		free(&daddrs[c]);
+	for (i = 0; i < ndaddrs; i++)
+		free(&daddrs[i]);
 
 	free_opts(1);
 

Modified: trunk/iptables/iptables-xml.c
===================================================================
--- trunk/iptables/iptables-xml.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/iptables-xml.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -54,7 +54,7 @@
 	{"verbose", 0, 0, 'v'},
 	{"combine", 0, 0, 'c'},
 	{"help", 0, 0, 'h'},
-	{0}
+	{ .name = NULL }
 };
 
 static void
@@ -85,10 +85,10 @@
 
 /* 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 @@
 static void
 free_argv(void)
 {
-	int i;
+	unsigned i;
 
 	for (i = 0; i < newargc; i++) {
 		free(newargv[i]);
@@ -149,7 +149,7 @@
 static void
 save_argv(void)
 {
-	int i;
+	unsigned i;
 
 	for (i = 0; i < oldargc; i++)
 		free(oldargv[i]);
@@ -228,7 +228,7 @@
 }
 
 static void
-closeChain()
+closeChain(void)
 {
 	if (curChain[0] == 0)
 		return;
@@ -316,7 +316,7 @@
 }
 
 static void
-finishChains()
+finishChains(void)
 {
 	int c;
 
@@ -331,7 +331,7 @@
 }
 
 static void
-closeTable()
+closeTable(void)
 {
 	closeChain();
 	finishChains();
@@ -536,7 +536,7 @@
 }
 
 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 @@
 	   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 @@
 
 			ret = 1;
 		} else if (curTable[0]) {
-			int a;
+			unsigned a;
 			char *ptr = buffer;
 			char *pcnt = NULL;
 			char *bcnt = NULL;

Modified: trunk/iptables/xtables.c
===================================================================
--- trunk/iptables/xtables.c	2008-01-29 13:46:01 UTC (rev 7305)
+++ trunk/iptables/xtables.c	2008-01-29 13:48:05 UTC (rev 7306)
@@ -257,10 +257,10 @@
 
 u_int16_t parse_port(const char *port, const char *proto)
 {
-	unsigned int portnum;
+	unsigned portnum;
 
 	if ((string_to_number(port, 0, 65535, &portnum)) != -1 ||
-	    (portnum = service_to_port(port, proto)) != -1)
+	    (portnum = service_to_port(port, proto)) != (unsigned)-1)
 		return (u_int16_t)portnum;
 
 	exit_error(PARAMETER_PROBLEM,




More information about the netfilter-cvslog mailing list