Skip to content

Commit

Permalink
Prevent gcc from optimizing away minimum bounding circle test fix
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/postgis/trunk@14451 b70326c6-7e19-0410-871a-916f4a2858ee
  • Loading branch information
dbaston committed Nov 30, 2015
1 parent e817920 commit 1c2fa14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion liblwgeom/cunit/cu_minimum_bounding_circle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 1c2fa14

Please sign in to comment.