[TRIVIAL PATCH] pptp / kill gcc warnings.
Harald Welte
laforge at netfilter.org
Thu Nov 3 19:16:59 CET 2005
On Mon, Aug 01, 2005 at 12:08:19PM +0200, Pawel Sikora wrote:
>
> CC [M] net/ipv4/netfilter/ip_conntrack_proto_gre.o
> net/ipv4/netfilter/ip_conntrack_proto_gre.c: In function 'gre_packet':
> net/ipv4/netfilter/ip_conntrack_proto_gre.c:283: warning:
> passing argument 3 of 'ip_ct_refresh_acct' discards qualifiers from pointer target type
> net/ipv4/netfilter/ip_conntrack_proto_gre.c:288: warning:
> passing argument 3 of 'ip_ct_refresh_acct' discards qualifiers from pointer target type
> net/ipv4/netfilter/ip_conntrack_proto_gre.c: At top level:
> net/ipv4/netfilter/ip_conntrack_proto_gre.c:329: warning:
> initialization from incompatible pointer type
>
> Index: linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_gre.c
> ===================================================================
> --- linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_gre.c (revision 4208)
> +++ linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_gre.c (working copy)
> @@ -273,7 +273,7 @@
>
> /* Returns verdict for packet, and may modify conntrack */
> static int gre_packet(struct ip_conntrack *ct,
> - const struct sk_buff *skb,
> + struct sk_buff *skb,
> enum ip_conntrack_info conntrackinfo)
> {
> /* If we've seen traffic both ways, this is a GRE connection.
this patch is invalid. Actually, you just move the warning to a
different place. the 'gre_packet()' function is a function pointer to
'struct ip_conntrack_protocol', which rquires the third parameter to be
a 'const struct sk_buff *'.
I also don't understand why you get that warning. ip_ct_refresh_acct()
also takes a 'const' argument ?!?
--
- Harald Welte <laforge at netfilter.org> http://netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/netfilter-devel/attachments/20051103/f579546e/attachment.pgp
More information about the netfilter-devel
mailing list