From: Paul Ramsey Date: Tue, 26 Jan 2010 20:20:47 +0000 (+0000) Subject: Remove warning from lwline X-Git-Tag: 1.5.0rc2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea8d4c55858c228a13d056a06b2e6e9835e9575b;p=postgis Remove warning from lwline git-svn-id: http://svn.osgeo.org/postgis/trunk@5170 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwline.c b/liblwgeom/lwline.c index d9adfb483..8dff039fe 100644 --- a/liblwgeom/lwline.c +++ b/liblwgeom/lwline.c @@ -564,8 +564,13 @@ lwline_measured_from_lwline(const LWLINE *lwline, double m_start, double m_end) for( i = 0; i < npoints; i++ ) { POINT4D q; + POINT2D a, b; getPoint3dz_p(lwline->points, i, &p2); - length_so_far += distance2d_pt_pt((POINT2D*)&p1, (POINT2D*)&p2); + a.x = p1.x; + a.y = p1.y; + b.x = p2.x; + b.y = p2.y; + length_so_far += distance2d_pt_pt(&a, &b); if ( length > 0.0 ) m = m_start + m_range * length_so_far / length; else