Subject: Re: patch to add rfc2228 support to ftpd
To: Aidan Cully <>
From: Johan Danielsson <>
List: tech-userlevel
Date: 03/27/2002 11:59:38
But I'm not conviced that GCC complains correctly all the time.

$ cat x.c
#include <stdlib.h>
#include <sys/types.h>
#include <netinet/in.h>

    struct sockaddr_in *sin;
    sin = NULL;
$ gcc -Wshadow -Wall -c x.c
x.c: In function `foo':
x.c:8: warning: declaration of `sin' shadows global declaration
$ gcc -Wshadow -Wall -c x.c -E | grep sin
        u_int8_t        sin_len;
        __sa_family_t   sin_family;
        u_int16_t       sin_port;
        struct in_addr  sin_addr;
        __int8_t                sin_zero[8];
        u_int8_t        sin6_len;        
        __sa_family_t   sin6_family;     
        u_int16_t       sin6_port;       
        u_int32_t       sin6_flowinfo;   
        struct in6_addr sin6_addr;       
        u_int32_t       sin6_scope_id;   
    struct sockaddr_in *sin;
    sin = 0 ;

So there is no globally declared "sin" and yet it complains about it.