[GRASS5] GRASS 5.1 v.in.ascii bug
Glynn Clements
glynn.clements at virgin.net
Fri May 9 08:02:58 EDT 2003
Markus Neteler wrote:
> > The gcc switch -Wimplicit-function-declaration (implied by -Wall) should
> > report missing prototypes (use -Werror-implicit-function-declaration to
> > make it an error rather than a warning).
>
> Trying this, I got:
Note: both of these errors are due to the use of -ansi, not the
-Werror-implicit-function-declaration switch.
This issue was described in more detail here:
From: Glynn Clements <glynn.clements at virgin.net>
Subject: Re: [GRASS5] r.sun bug
Date: Mon, 24 Feb 2003 18:53:25 +0000
Message-ID: <15962.27173.280123.968664 at cerise.nosuchdomain.co.uk>
> gcc -g -Wall -ansi -Werror-implicit-function-declaration -Wall
> -I/ssi0/ssi/neteler/grass51/include
> -I/ssi0/ssi/neteler/grass51/dist.i686-pc-linux-gnu/include
> -I/ssi0/ssi/neteler/grass51/include
> -I/ssi0/ssi/neteler/grass51/dist.i686-pc-linux-gnu/include \
> -o OBJ.i686-pc-linux-gnu/sleep.o -c sleep.c
> sleep.c: In function 'time_ltp':
> sleep.c:64: storage size of 'tzone' isn't known
> sleep.c:64: warning: unused variable zone'
> sleep.c: At top level:
> /ssi0/ssi/neteler/grass51/include/gis.h:36: warning: RASS_copyright'
> defined but not used
> make[2]: *** [OBJ.i686-pc-linux-gnu/sleep.o] Error 1
> make[2]: Leaving directory /hardmnt/thuille0/ssi/grass51/lib/gis'
> make[1]: *** [subdirs] Error 1
>
> Is below a reasonable path?
Yes; except, you don't need an explicit type cast for NULL.
> The next error appears in lib/image/open.c which I don't know to fix:
>
> gcc -g -Wall -ansi -Werror-implicit-function-declaration -Wall
> -I/ssi0/ssi/neteler/grass51/include
> -I/ssi0/ssi/neteler/grass51/dist.i686-pc-linux-gnu/include
> -I/ssi0/ssi/neteler/grass51/include
> -I/ssi0/ssi/neteler/grass51/dist.i686-pc-linux-gnu/include \
> -o OBJ.i686-pc-linux-gnu/open.o -c open.c
> open.c:29: parse error before 'getshort'
That file relies upon BSD extensions, so you need to use
-D_BSD_SOURCE=1 when using -ansi (when not using -ansi, gcc enables
most of the extension macros).
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list