Details Ticket 5025


Comment | Reply | Take | Open


Serial Number 5025
Subject v.hull: empty if statement
Area grass6
Queue grass
Requestors neteler@itc.it
Owner none
Status resolved
Last User Contact Sat Aug 19 15:25:27 2006 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Sat Aug 19 15:53:43 2006 (2 yr ago)
Created Sat Aug 19 14:10:53 2006 (2 yr ago)

Transaction History Ticket 5025


Sat, Aug 19 2006 14:10:53    Request created by guest  
Subject: v.hull: empty if statement

grass obtained from: CVS
grass binary for platform: Compiled from Sources

Hi,

compiling v.hull, I discovered:

[neteler@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.

Markus
Sat, Aug 19 2006 15:25:27    Mail sent by glynn@gclements.plus.com  
Return-Path <glynn@gclements.plus.com>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn@gclements.plus.com>
MIME-Version 1.0
Content-Type text/plain; charset=iso-2022-jp
Content-Transfer-Encoding quoted-printable
Message-ID <17639.4410.320282.413432@cerise.gclements.plus.com>
Date Sat, 19 Aug 2006 14:25:14 +0100
To Request Tracker <grass-bugs@intevation.de>
Cc grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #5025] (grass) v.hull: empty if statement
In-Reply-To <20060819121053.0838110015B@lists.intevation.de>
References <20060819121053.0838110015B@lists.intevation.de>
X-Mailer VM 7.07 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-3.985 tagged_above=-999 required=3 tests=[AWL=1.015, BAYES_00=-5]
X-Spam-Level
Request Tracker wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=3D5025
> ---------------------------------------------------------------------=
----
>=20
> Subject: v.hull: empty if statement
>=20
> grass obtained from: CVS
> grass binary for platform: Compiled from Sources
>=20
> Hi,
>=20
> compiling v.hull, I discovered:
>=20
> [neteler@dandre v.hull]$ make
> ...
> main.c: In function =E2=80=98loadSiteCoordinates=E2=80=99:
> main.c:141: warning: empty body in an if-statement
>=20
>             if ((pointIdx % ALLOC_CHUNK) =3D=3D 0);
>                *points =3D (struct Point *) G_realloc(*points, (point=
Idx + ALLOC_CHUNK) * sizeof(struct Point));
>=20
> I don't know how to fix this.

Remove the semicolon; the above will be parsed as:

=09if ((pointIdx % ALLOC_CHUNK) =3D=3D 0)
=09=09;
=09*points =3D (struct Point *) G_realloc(*points, (pointIdx + ALLOC_CH=
UNK) * 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.

--=20
Glynn Clements <glynn@gclements.plus.com>


Sat, Aug 19 2006 15:53:43    Status changed to resolved by mneteler  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request