netdev
[Top] [All Lists]

Re: Oops - bug in IPv6 code

To: Andrew Morton <morton@xxxxxxxxxxxxxxxxxx>
Subject: Re: Oops - bug in IPv6 code
From: Craig Rodrigues <rodrigc@xxxxxxxxxxxx>
Date: Sat, 27 Nov 1999 13:49:37 -0500
Cc: netdev@xxxxxxxxxxx
In-reply-to: <383FC97A.A5074285@asiapacificm01.nt.com>; from morton@nortelnetworks.com on Sat, Nov 27, 1999 at 12:07:22PM +0000
References: <19991127103026.A6725@wiget> <19991127111632.A18674@nvg.ntnu.no> <383FC97A.A5074285@asiapacificm01.nt.com>
Sender: owner-netdev@xxxxxxxxxxx
On Sat, Nov 27, 1999 at 12:07:22PM +0000, Andrew Morton wrote:
> venaas wrote:
> >                 if (dst == NULL) {
> >                         struct flowi fl;
> > -                       struct dst_entry *dst;
> 
> Compilation with -Wshadow would have caught this.
> 
> Any reason why this is not done?

Compiling with -Wshadow spews lots of warnings:
cc -c -Wshadow -I/usr/src/linux/include -D__KERNEL__ -I. -o tcp_ipv6.o 
tcp_ipv6.c 

In file included from /usr/src/linux/include/net/checksum.h:33,
                 from /usr/src/linux/include/net/tcp.h:24,
                 from tcp_ipv6.c:37:
/usr/src/linux/include/asm/checksum.h: In function `csum_and_copy_to_user':
/usr/src/linux/include/asm/checksum.h:206: warning: declaration of `sum' 
shadows a parameter
In file included from tcp_ipv6.c:41:
/usr/src/linux/include/net/addrconf.h: At top level:
/usr/src/linux/include/net/addrconf.h:47: warning: declaration of `event' 
shadows global declaration
In file included from /usr/src/linux/include/net/ip6_route.h:13,
                 from tcp_ipv6.c:42:
/usr/src/linux/include/net/ip6_fib.h:170: warning: declaration of `event' 
shadows global declaration
tcp_ipv6.c: In function `tcp_v6_connect':
tcp_ipv6.c:438: warning: declaration of `sin' shadows global declaration
tcp_ipv6.c: In function `tcp_v6_err':
tcp_ipv6.c:635: warning: declaration of `dst' shadows previous local            
  
-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@xxxxxxxxxxxx          

<Prev in Thread] Current Thread [Next in Thread>