[GRASS-dev] [bug #5025] (grass) v.hull: empty if statement
Glynn Clements
glynn at gclements.plus.com
Sat Aug 19 09:25:14 EDT 2006
Request Tracker wrote:
> this bug's URL: http://intevation.de/rt/webrt?serial_num=5025
> -------------------------------------------------------------------------
>
> Subject: v.hull: empty if statement
>
> grass obtained from: CVS
> grass binary for platform: Compiled from Sources
>
> Hi,
>
> compiling v.hull, I discovered:
>
> [neteler at dandre v.hull]$ make
> ...
> main.c: In function âloadSiteCoordinatesâ:
> main.c:141: warning: empty body in an if-statement
>
> if ((pointIdx % ALLOC_CHUNK) == 0);
> *points = (struct Point *) G_realloc(*points, (pointIdx + ALLOC_CHUNK) * sizeof(struct Point));
>
> I don't know how to fix this.
Remove the semicolon; the above will be parsed as:
if ((pointIdx % ALLOC_CHUNK) == 0)
;
*points = (struct Point *) G_realloc(*points, (pointIdx + ALLOC_CHUNK) * sizeof(struct Point));
A semicolon on its own is a valid statement which does nothing, hence
the "empty body" warning.
I've fixed this in CVS.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list