[GRASS5] XDRIVER compile problem on CRAY

Hi all,

maybe Andreas can help: A new compile problem is there on CRAY,
probably due to the latest cast fixes (I won't change anything here :slight_smile:

/home/t3e/fsn/nhdc/nhdcmark/grass/src/display/devices/XDRIVER/XDRIVER24
  make -f OBJ.alpha-cray-unicosmk2.0.4.X/make.rules

        cc -g -I../../lib
-I/home/t3e/fsn/nhdc/nhdcmark/grass/src/include -c Raster.c -o
OBJ.alpha-cray-unicosmk2.0.4.X/Raster.o
CC-513 cc: ERROR File = Raster.c, Line = 83
  A value of type "XImage *" cannot be assigned to an entity of type "char
*".

              grimage->data = (XImage *) G_malloc((size_t) (num *
bytes_per_pixel));
                            ^

CC-513 cc: ERROR File = Raster.c, Line = 85
  A value of type "XImage *" cannot be assigned to an entity of type "char
*".

              grimage->data = (XImage *) realloc((void *)grimage->data,
(size_t) (num * bytes_per_pixel));
                            ^

CC-167 cc: WARNING File = Raster.c, Line = 94
  Argument of type "unsigned int *" is incompatible with parameter of type
          "int *".

              _get_color_index_array(array, num) ;
                                     ^

2 errors detected in the compilation of "Raster.c".
Make: "cc -g -I../../lib -I/home/t3e/fsn/nhdc/nhdcmark/grass/src/include
-c Raster.c -o OBJ.alpha-cray-unicosmk2.0.4.X/Raster.o": Error code 1
cmd-2436 make: Stop.
Make: "/home/t3e/fsn/nhdc/nhdcmark/grass5bin/gmake5 XDRIVER24": Error code 1

Especially line 83/85 are causing an error on CRAY, but they cause a warning
on Linux as well.

Could anyone take care for this?

Thanks

Markus

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hi Markus,

i see what the problem is. The typecasts are incorrect. Sorry.

But please allow me until Saturday to make the fixes, as i am busy right
now and want to test again (with lclint/gcc -ansi -pedantic) before
committing.
The last round of updating these files was a bit chaotic and i have to
merge some Cygwin related changes too.

cu,

Andreas

Markus Neteler wrote:

Hi all,

maybe Andreas can help: A new compile problem is there on CRAY,
probably due to the latest cast fixes (I won't change anything here :slight_smile:

/home/t3e/fsn/nhdc/nhdcmark/grass/src/display/devices/XDRIVER/XDRIVER24
  make -f OBJ.alpha-cray-unicosmk2.0.4.X/make.rules

        cc -g -I../../lib
-I/home/t3e/fsn/nhdc/nhdcmark/grass/src/include -c Raster.c -o
OBJ.alpha-cray-unicosmk2.0.4.X/Raster.o
CC-513 cc: ERROR File = Raster.c, Line = 83
  A value of type "XImage *" cannot be assigned to an entity of type "char
*".

              grimage->data = (XImage *) G_malloc((size_t) (num *
bytes_per_pixel));
                            ^

CC-513 cc: ERROR File = Raster.c, Line = 85
  A value of type "XImage *" cannot be assigned to an entity of type "char
*".

              grimage->data = (XImage *) realloc((void *)grimage->data,
(size_t) (num * bytes_per_pixel));
                            ^

CC-167 cc: WARNING File = Raster.c, Line = 94
  Argument of type "unsigned int *" is incompatible with parameter of type
          "int *".

              _get_color_index_array(array, num) ;
                                     ^

2 errors detected in the compilation of "Raster.c".
Make: "cc -g -I../../lib -I/home/t3e/fsn/nhdc/nhdcmark/grass/src/include
-c Raster.c -o OBJ.alpha-cray-unicosmk2.0.4.X/Raster.o": Error code 1
cmd-2436 make: Stop.
Make: "/home/t3e/fsn/nhdc/nhdcmark/grass5bin/gmake5 XDRIVER24": Error code 1

Especially line 83/85 are causing an error on CRAY, but they cause a warning
on Linux as well.

Could anyone take care for this?

Thanks

Markus

--
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange@Rhein-Main.de - A.C.Lange@GMX.net

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'