All of lore.kernel.org
 help / color / mirror / Atom feed
* [TRIVIAL PATCH] pptp / kill gcc warnings.
@ 2005-08-01 10:08 Pawel Sikora
  2005-11-03 18:16 ` Harald Welte
  0 siblings, 1 reply; 2+ messages in thread
From: Pawel Sikora @ 2005-08-01 10:08 UTC (permalink / raw)
  To: Netfilter Development Mailinglist, Patrick McHardy

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: pptp.diff --]
[-- Type: text/x-diff, Size: 1259 bytes --]

  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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [TRIVIAL PATCH] pptp / kill gcc warnings.
  2005-08-01 10:08 [TRIVIAL PATCH] pptp / kill gcc warnings Pawel Sikora
@ 2005-11-03 18:16 ` Harald Welte
  0 siblings, 0 replies; 2+ messages in thread
From: Harald Welte @ 2005-11-03 18:16 UTC (permalink / raw)
  To: Pawel Sikora; +Cc: Netfilter Development Mailinglist, Patrick McHardy

[-- Attachment #1: Type: text/plain, Size: 2128 bytes --]

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@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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-03 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-01 10:08 [TRIVIAL PATCH] pptp / kill gcc warnings Pawel Sikora
2005-11-03 18:16 ` Harald Welte

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.