[GRASS5] d.legend with vector file support
Glynn Clements
glynn at gclements.plus.com
Tue May 17 21:08:29 EDT 2005
Jachym Cepicky wrote:
> After moving the code to separate file, I get warnings:
>
> ...
> vector.c:213: warning: passing arg 1 of `R_RGB_color' with different width due to prototype
> ...
>
> and I don't know what to do with this
The red/green/blue fields of struct Vcat_clrs are of type int, but the
arguments to R_RGB_color() are of type unsigned char.
Either change the struct Vcat_clrs fields to unsigned char, or
explicitly cast the arguments to R_RGB_color(), e.g.:
R_RGB_color(
(unsigned char) vcat_clrs[i].red,
(unsigned char) vcat_clrs[i].green,
(unsigned char) vcat_clrs[i].blue);
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list