[GRASS5] compile error in splitfont.c in module for_grass

Markus Neteler neteler at itc.it
Tue Jul 8 15:59:29 EDT 2003


On Tue, Jul 08, 2003 at 04:20:34PM +0100, Glynn Clements wrote:
> 
> Markus Neteler wrote:
> 
> > I tried the proposed patch, but it still fails (gcc 3.2.2 on Mandrake 9.1).
> 
> A couple of other things to try include:
> 
> 1. Change the type of the variable "achar" from char to int (the code
> assumes that achar can hold negative values, but C doesn't specify
> whether char is signed or unsigned).

This works out of the box, great.

> 2. Change the second argument to memset() (at line 63) from a
> character literal to an integer literal, i.e.:
> 
> 		memset(map, 0, sizeof(map));

Applying this additionally, it still compiles.
Applying only the second, gcc3.2.2 crashes. So the first change
does the trick.

Thanks for identifying the problem!

 Markus




More information about the grass-dev mailing list