pkgsrc-Bugs archive

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

Re: pkg/45210: bootstrap fails with gcc-4.6 in libfetch (debian wheezy)



On Sat, Oct 01, 2011 at 07:19:31PM +0200, John Marino wrote:
> I ran into this today trying to bootstrap pkgsrc on OpenIndiana OI-151a
> (released 14 Sep 2011) using the sfe gcc-4.6.1.
> 
> I came up with a different patch (below) that may be a little cleaner,
> and it should also work with clang.  In any case, either the -Werror
> flag has to be removed or ftp.c has to be patched in order to build
> libfetch using gcc 4.6.
> 
> -- John
> 
> 
> --- files/ftp.c.orig  2011-10-01 17:08:28.658519066 +0200
> +++ files/ftp.c       2011-10-01 17:18:10.166043862 +0200
> @@ -619,7 +619,7 @@
>  ftp_closefn(void *v)
>  {
>       struct ftpio *io;
> -     int r;
> +     int r __attribute__ ((unused));
> 
>       io = (struct ftpio *)v;
>       if (io == NULL) {
> @@ -677,7 +677,8 @@
>       const char *bindaddr;
>       const char *filename;
>       int filenamelen, type;
> -     int low, pasv, verbose;
> +     int low __attribute__ ((unused));
> +     int pasv, verbose;
>       int e, sd = -1;
>       socklen_t l;
>       char *s;

if a variable isn't used, why bother to have it in the first place?

confused of cupertino


Home | Main Index | Thread Index | Old Index