[GRASS5] Re: [bug #2767] (grass) r.stats bug (due to recent G_store() fix?)
Markus Neteler
neteler at itc.it
Tue Dec 7 16:27:14 EST 2004
Hello Paul,
On Tue, Dec 07, 2004 at 10:21:08PM +0100, Paul Kelly via RT wrote:
> I'm not sure this line:
> if (title == NULL) title="";
> looks right.
> Perhaps try changing to
> if (title == NULL) *title="";
> Makes more logical sense but still might not work.
I tried, but still segfault.
> If it doesn't something like this might:
> int
> G_set_raster_cats_title (char *intitle, struct Categories *pcats)
> {
> char *title;
> if (intitle == NULL)
> *title="";
> else
> title=intitle;
> pcats->title = G_store (title);
> G_newlines_to_spaces (pcats->title);
> G_strip (pcats->title);
> return 0;
> }
gcc reports
cats.c:1539: warning: assignment makes integer from pointer without a cast
here (l 1539 is: *title="";).
Also tried and segfault.
Thanks and sorry for no better news,
Markus
More information about the grass-dev
mailing list