linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maciej Soltysiak <solt@dns.toxicfilms.tv>
To: linux-kernel@vger.kernel.org
Cc: alan@lxorguk.ukuu.org.uk, netfilter-devel@lists.netfilter.org
Subject: [RESEND][PATCH] net/ipv6/netfilter warnings removal
Date: Wed, 23 Apr 2003 14:38:32 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.51.0304231434540.4838@dns.toxicfilms.tv> (raw)
In-Reply-To: <Pine.LNX.4.51.0304072115010.19830@dns.toxicfilms.tv>

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);

  reply	other threads:[~2003-04-23 12:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-05 14:21 [PATCH] C99 Initialisers for drivers/video Maciej Soltysiak
2003-04-05 18:51 ` James Simmons
2003-04-07 19:16 ` [PATCH] C99 Initialisers around scsi + ac97_codec.c Maciej Soltysiak
2003-04-23 12:38   ` Maciej Soltysiak [this message]
2003-04-24  4:50     ` [RESEND][PATCH] net/ipv6/netfilter warnings removal David S. Miller
2003-04-27 13:12       ` Harald Welte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.51.0304231434540.4838@dns.toxicfilms.tv \
    --to=solt@dns.toxicfilms.tv \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).