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
|