]> granicus.if.org Git - postgis/commitdiff
Fix a "set but not used" warning.
authorSandro Santilli <strk@keybit.net>
Fri, 12 Oct 2012 08:34:35 +0000 (08:34 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 12 Oct 2012 08:34:35 +0000 (08:34 +0000)
This was about the return from getPoint2d_p, but it really only
returns zero on error and after lwerror was called, and only if
a PARANOIA compile time macro is set...

git-svn-id: http://svn.osgeo.org/postgis/trunk@10414 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwalgorithm.c

index 2768cb073bdbb27fc7f863f0e0a5318fcb9b2bf4..1fe230390ca9547d8329d3bda72bdae299d81e17 100644 (file)
@@ -454,7 +454,7 @@ int lw_segment_intersects(const POINT2D *p1, const POINT2D *p2, const POINT2D *q
 */
 int lwline_crossing_direction(const LWLINE *l1, const LWLINE *l2)
 {
-       int i = 0, j = 0, rv = 0;
+       int i = 0, j = 0;
        POINT2D p1, p2, q1, q2;
        POINTARRAY *pa1 = NULL, *pa2 = NULL;
        int cross_left = 0;
@@ -473,22 +473,22 @@ int lwline_crossing_direction(const LWLINE *l1, const LWLINE *l2)
        LWDEBUGF(4, "l2 = %s", lwgeom_to_ewkt((LWGEOM*)l2));
 
        /* Initialize first point of q */
-       rv = getPoint2d_p(pa2, 0, &q1);
+       getPoint2d_p(pa2, 0, &q1);
 
        for ( i = 1; i < pa2->npoints; i++ )
        {
 
                /* Update second point of q to next value */
-               rv = getPoint2d_p(pa2, i, &q2);
+               getPoint2d_p(pa2, i, &q2);
 
                /* Initialize first point of p */
-               rv = getPoint2d_p(pa1, 0, &p1);
+               getPoint2d_p(pa1, 0, &p1);
 
                for ( j = 1; j < pa1->npoints; j++ )
                {
 
                        /* Update second point of p to next value */
-                       rv = getPoint2d_p(pa1, j, &p2);
+                       getPoint2d_p(pa1, j, &p2);
 
                        this_cross = lw_segment_intersects(&p1, &p2, &q1, &q2);