From 1c2fa14cfeb1a7876b5c47d41b1c846d22a9726b Mon Sep 17 00:00:00 2001 From: Daniel Baston Date: Mon, 30 Nov 2015 01:47:03 +0000 Subject: [PATCH] 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 --- liblwgeom/cunit/cu_minimum_bounding_circle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.50.1