]> granicus.if.org Git - postgis/commitdiff
Prevent gcc from optimizing away minimum bounding circle test fix
authorDaniel Baston <dbaston@gmail.com>
Mon, 30 Nov 2015 01:47:03 +0000 (01:47 +0000)
committerDaniel Baston <dbaston@gmail.com>
Mon, 30 Nov 2015 01:47:03 +0000 (01:47 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@14451 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/cunit/cu_minimum_bounding_circle.c

index 277fd7bb8de01fbae63a3335b03513a481728c3e..71f98cf8352313220347c4c1b3f23679cb41cba0 100644 (file)
@@ -30,7 +30,7 @@ static void mbc_test(LWGEOM* g)
                /* We need to store the distance in a variable before the assert so that 
                 * it is rounded from its 80-bit representation (on x86) down to 64 bits. 
                 * */
-               double d = distance2d_pt_pt(result->center, &p);
+               volatile double d = distance2d_pt_pt(result->center, &p);
 
                CU_ASSERT_TRUE(d <= result->radius);
        }