[GRASS5] bug in lib/image/open.c?

Vincent Schut vincent at ecovla.nl
Tue Jun 14 11:32:34 EDT 2005


Hi all,

since the proper return types have been added to lib/image/open.c (last
saturday, I believe), compilation fails with the following error:

gcc -I/usr/local/src/grass-cvs/include
-I/usr/local/src/grass-cvs/dist.x86_64-unknown-linux-gnu/include/grass
-g -D_FILE_OFFSET_BITS=64 -O2 -march=k8 -fomit-frame-pointer -pipe
-Wall -Wconversion -Wno-implicit-int   -fPIC    -DPACKAGE=
\""grasslibs"\"     -DPACKAGE=\""grasslibs"\"
-I/usr/local/src/grass-cvs/include
-I/usr/local/src/grass-cvs/dist.x86_64-unknown-linux-gnu/include/grass \
        -o OBJ.x86_64-unknown-linux-gnu/open.o -c open.c
open.c: In function `imgopen':
open.c:60: warning: implicit declaration of function `i_errhdlr'
open.c:134: warning: passing arg 1 of `cvtimage' from incompatible
pointer type
open.c:172: warning: passing arg 2 of `cvtlongs' as signed due to
prototype
open.c:178: warning: passing arg 2 of `cvtlongs' as signed due to
prototype
open.c: In function `cvtimage':
open.c:238: warning: passing arg 1 of `cvtshorts' from incompatible
pointer type
open.c:238: warning: passing arg 2 of `cvtshorts' with different width
due to prototype
open.c:239: warning: passing arg 2 of `cvtlongs' with different width
due to prototype
open.c:240: warning: passing arg 2 of `cvtlongs' with different width
due to prototype
open.c: At top level:
open.c:253: error: conflicting types for 'i_errhdlr'
open.c:60: error: previous implicit declaration of 'i_errhdlr' was here
open.c:276: warning: 'getshort' defined but not used
open.c:284: warning: 'getlong' defined but not used
make: *** [OBJ.x86_64-unknown-linux-gnu/open.o] Error 1

When I remove the 'void' from line 253, everything compiles fine.

I'm on gentoo linux, amd64, gcc 3.4.3, grass fresh from cvs.

Regards,
Vincent.




More information about the grass-dev mailing list