pptp / kill gcc warnings.
Subsystems (2)
PATCH 1/1 pptp / kill gcc warnings.
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
net/ipv4/netfilter/ip_conntrack_proto_gre.c +1 -1
@@ -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.
Quoted 17 lines · Pawel Sikora
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 typeIndex:
linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_gre.c
===================================================================
net/ipv4/netfilter/ip_conntrack_proto_gre.c line 279
Quoted 8 lines
net/ipv4/netfilter/ip_conntrack_proto_gre.c +1
-1@@ -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 ?!?
Signature · 5 lines
- Harald Welte <[email protected]> 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