[RESEND][PATCH] net/ipv6/netfilter warnings removal

Maciej Soltysiak (solt@dns.toxicfilms.tv)
Wed, 23 Apr 2003 14:38:32 +0200 (CEST)


Hello,

There are simple warnings to remove in 4 files there, here are the
warnings:
net/ipv6/netfilter/ip6t_rt.c: In function `match':
net/ipv6/netfilter/ip6t_rt.c:133: warning: assignment from incompatible
pointer type
net/ipv6/netfilter/ip6t_frag.c: In function `match':
net/ipv6/netfilter/ip6t_frag.c:150: warning: assignment from incompatible
pointer type
net/ipv6/netfilter/ip6t_esp.c: In function `match':
net/ipv6/netfilter/ip6t_esp.c:126: warning: assignment from incompatible
pointer type
net/ipv6/netfilter/ip6t_ah.c: In function `match':
net/ipv6/netfilter/ip6t_ah.c:136: warning: assignment from incompatible
pointer type

And here is the patch to remove those by using casts.

It applies both to 2.4.20+ and 2.5.67+.

Regards,
Maciej

diff -Nru linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_ah.c linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_ah.c
--- linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_ah.c 2003-04-11 18:41:29.000000000 +0200
+++ linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_ah.c 2003-04-11 18:49:41.000000000 +0200
@@ -133,7 +133,7 @@
return 0;
}

- ah=skb->data+ptr;
+ ah = (struct ahhdr *) (skb->data + ptr);

DEBUGP("IPv6 AH LEN %u %u ", hdrlen, ah->hdrlen);
DEBUGP("RES %04X ", ah->reserved);
Binary files linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_ah.ko and linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_ah.ko differ
Binary files linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_ah.o and linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_ah.o differ
diff -Nru linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_esp.c linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_esp.c
--- linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_esp.c 2003-04-11 18:41:29.000000000 +0200
+++ linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_esp.c 2003-04-11 18:48:24.000000000 +0200
@@ -123,7 +123,7 @@
return 0;
}

- esp=skb->data+ptr;
+ esp = (struct esphdr *) (skb->data + ptr);

DEBUGP("IPv6 ESP SPI %u %08X\n", ntohl(esp->spi), ntohl(esp->spi));

Binary files linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_esp.ko and linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_esp.ko differ
Binary files linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_esp.o and linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_esp.o differ
diff -Nru linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_frag.c linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_frag.c
--- linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_frag.c 2003-04-11 18:41:29.000000000 +0200
+++ linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_frag.c 2003-04-11 18:48:09.000000000 +0200
@@ -147,7 +147,7 @@
return 0;
}

- frag=skb->data+ptr;
+ frag = (struct fraghdr *) (skb->data + ptr);

DEBUGP("IPv6 FRAG LEN %u %u ", hdrlen, frag->hdrlen);
DEBUGP("INFO %04X ", frag->info);
Binary files linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_frag.ko and linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_frag.ko differ
Binary files linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_frag.o and linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_frag.o differ
diff -Nru linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_rt.c linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_rt.c
--- linux-2.5.67-bk3.orig/net/ipv6/netfilter/ip6t_rt.c 2003-04-11 18:41:29.000000000 +0200
+++ linux-2.5.67-bk3/net/ipv6/netfilter/ip6t_rt.c 2003-04-11 18:53:36.000000000 +0200
@@ -130,7 +130,7 @@
return 0;
}

- route=skb->data+ptr;
+ route = (struct ipv6_rt_hdr *) (skb->data + ptr);

DEBUGP("IPv6 RT LEN %u %u ", hdrlen, route->hdrlen);
DEBUGP("TYPE %04X ", route->type);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/