Subject: Re: bin/36280: small syntax misstake in ftp client source file
To: Christos Zoulas <christos@zoulas.com>
From: Christer Folkesson <christer@aqualize.se>
List: netbsd-bugs
Date: 05/05/2007 19:11:42
> On May 5,  5:00pm, martin@duskware.de (Martin Husemann) wrote:
> -- Subject: Re: bin/36280: small syntax misstake in ftp client source file
> (p
>
> | The following reply was made to PR bin/36280; it has been noted by
> GNATS.
> |
> | From: Martin Husemann <martin@duskware.de>
> | To: dreamcatcher+netbsd@aqualize.se
> | Cc: gnats-bugs@NetBSD.org
> | Subject: Re: bin/36280: small syntax misstake in ftp client source file
> (progressbar.c), causing compiler warning
> | Date: Sat, 5 May 2007 18:55:39 +0200
> |
> |  On Sat, May 05, 2007 at 04:50:01PM +0000,
> dreamcatcher+netbsd@aqualize.se wrote:
> |  > When I tried to "make" I got a warning message from cc and it exited
> (because -Werror). So I guess this should be changed so it compiles
> nicely.
> |
> |  Which compiler are you using?
> |
> |  > >Fix:
> |  > Remove that (the second) const keyword from line 96 in progressbar.c
> |  >
> |  > /* change: */
> |  > static const char const *suffixes[] = {
> |
> |  This is correct syntax: it declares an array of const pointers to const
> chars,
> |  there is no warning when compiled with a modern compiler.
> |
> |  Martin
>
> Actually that should be "const char * const" if we wanted that...
>
> christos
>

I used gcc 3.3.3
the standard on netbsd 3.1 (?, installed the OS a few days ago)


I downloaded it (from MAIN as said) from the CVS, only the src/usr.bin/ftp
I went to that directory and wrote make :)
It tells me this:
#   compile  ftp/progressbar.o
cc -O2   -Werror   -DINET6    -c    progressbar.c
progressbar.c:96: warning: duplicate `const'
*** Error code 1

It compiles nicely with the asterix crhistos suggested above.

Christer