pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/43491: libfetch compile warnings with gcc in ftp.c



The following reply was made to PR pkg/43491; it has been noted by GNATS.

From: Dan McGee <dan%archlinux.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/43491: libfetch compile warnings with gcc in ftp.c
Date: Sun, 20 Jun 2010 12:15:29 -0500

 On Sun, Jun 20, 2010 at 12:05 PM, Joerg Sonnenberger
 <joerg%britannica.bec.de@localhost> wrote:
 > The following reply was made to PR pkg/43491; it has been noted by GNATS.
 >
 > From: Joerg Sonnenberger <joerg%britannica.bec.de@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc:
 > Subject: Re: pkg/43491: libfetch compile warnings with gcc in ftp.c
 > Date: Sun, 20 Jun 2010 19:02:32 +0200
 >
 > =C2=A0On Sun, Jun 20, 2010 at 04:25:00PM +0000, dan%archlinux.org@localhost 
 > wrote:
 > =C2=A0> Compiling libfetch under gcc (GCC) 4.5.0 20100610 (prerelease) on=
  Linux
 > =C2=A0> yields the following warnings, which are easily fixable. This was=
  with
 > =C2=A0> 2.32 but it has existed for a while.
 >
 > =C2=A0This warnings look bogus. I'm not really inclined to hack around th=
 is.
 > =C2=A0Essentially, sin6_addr is a union and it shouldn't complain as long=
  as
 > =C2=A0it stays within the size of the union and if the patch helps, it
 > =C2=A0certainly should have done that in the original case already.
 
 I agree it looks bogus, considering the fix. It only happens on x86_64
 vs. i686 as well, which is interesting. Version 2.12 of glibc on both
 systems.
 
 Does it hurt to point at the right internal element though? It doesn't
 seem like a huge hack to me, and you refer to s6_addr elsewhere in
 ftp.c.
 
 Just for reference, here is the declaration in the header files:
 
 /* IPv6 address */
 struct in6_addr
   {
     union
       {
     uint8_t __u6_addr8[16];
 #if defined __USE_MISC || defined __USE_GNU
     uint16_t __u6_addr16[8];
     uint32_t __u6_addr32[4];
 #endif
       } __in6_u;
 #define s6_addr         __in6_u.__u6_addr8
 #if defined __USE_MISC || defined __USE_GNU
 # define s6_addr16      __in6_u.__u6_addr16
 # define s6_addr32      __in6_u.__u6_addr32
 #endif
   };
 
 /* Ditto, for IPv6.  */
 struct sockaddr_in6
   {
     __SOCKADDR_COMMON (sin6_);
     in_port_t sin6_port;    /* Transport layer port # */
     uint32_t sin6_flowinfo; /* IPv6 flow information */
     struct in6_addr sin6_addr;  /* IPv6 address */
     uint32_t sin6_scope_id; /* IPv6 scope-id */
   };
 
 -Dan
 


Home | Main Index | Thread Index | Old Index