From: Daniel Baston Date: Mon, 30 Nov 2015 01:47:03 +0000 (+0000) Subject: Prevent gcc from optimizing away minimum bounding circle test fix X-Git-Tag: 2.3.0beta1~354 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c2fa14cfeb1a7876b5c47d41b1c846d22a9726b;p=postgis Prevent gcc from optimizing away minimum bounding circle test fix git-svn-id: http://svn.osgeo.org/postgis/trunk@14451 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/cunit/cu_minimum_bounding_circle.c b/liblwgeom/cunit/cu_minimum_bounding_circle.c index 277fd7bb8..71f98cf83 100644 --- a/liblwgeom/cunit/cu_minimum_bounding_circle.c +++ b/liblwgeom/cunit/cu_minimum_bounding_circle.c @@ -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); }