[GRASS-SVN] r70784 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Mar 21 13:51:43 PDT 2017
Author: mmetz
Date: 2017-03-21 13:51:43 -0700 (Tue, 21 Mar 2017)
New Revision: 70784
Modified:
grass/trunk/lib/vector/Vlib/intersect.c
Log:
vectorlib: reduce compiler warnings
Modified: grass/trunk/lib/vector/Vlib/intersect.c
===================================================================
--- grass/trunk/lib/vector/Vlib/intersect.c 2017-03-21 20:45:45 UTC (rev 70783)
+++ grass/trunk/lib/vector/Vlib/intersect.c 2017-03-21 20:51:43 UTC (rev 70784)
@@ -83,8 +83,8 @@
#if 0
static int ident(double x1, double y1, double x2, double y2, double thresh);
#endif
-static int cross_seg(int id, const struct RTree_Rect *rect, int *arg);
-static int find_cross(int id, const struct RTree_Rect *rect, int *arg);
+static int cross_seg(int id, const struct RTree_Rect *rect, void *arg);
+static int find_cross(int id, const struct RTree_Rect *rect, void *arg);
#define D ((ax2-ax1)*(by1-by2) - (ay2-ay1)*(bx1-bx2))
#define D1 ((bx1-ax1)*(by1-by2) - (by1-ay1)*(bx1-bx2))
@@ -544,13 +544,13 @@
static struct line_pnts *APnts, *BPnts;
/* break segments (called by rtree search) */
-static int cross_seg(int id, const struct RTree_Rect *rect, int *arg)
+static int cross_seg(int id, const struct RTree_Rect *rect, void *arg)
{
double x1, y1, z1, x2, y2, z2;
int i, j, ret;
/* !!! segment number for B lines is returned as +1 */
- i = *arg;
+ i = *(int *)arg;
j = id - 1;
/* Note: -1 to make up for the +1 when data was inserted */
@@ -804,7 +804,7 @@
box.T = rect.boundary[5] + rethresh;
if (Vect_box_overlap(&abbox, &box)) {
- j = RTreeSearch(MyRTree, &rect, (void *)cross_seg, &i); /* A segment number from 0 */
+ j = RTreeSearch(MyRTree, &rect, cross_seg, &i); /* A segment number from 0 */
}
}
@@ -1170,13 +1170,13 @@
static int cross_found; /* set by find_cross() */
/* break segments (called by rtree search) */
-static int find_cross(int id, const struct RTree_Rect *rect, int *arg)
+static int find_cross(int id, const struct RTree_Rect *rect, void *arg)
{
double x1, y1, z1, x2, y2, z2;
int i, j, ret;
/* !!! segment number for B lines is returned as +1 */
- i = *arg;
+ i = *(int *)arg;
j = id - 1;
/* Note: -1 to make up for the +1 when data was inserted */
@@ -1381,7 +1381,7 @@
rect.boundary[5] = APoints->z[i];
}
- RTreeSearch(MyRTree, &rect, (void *)find_cross, &i); /* A segment number from 0 */
+ RTreeSearch(MyRTree, &rect, find_cross, &i); /* A segment number from 0 */
if (cross_found) {
break;
More information about the grass-commit
mailing list