From 19bfb4987a8085d3ec1c8f29423866f884fdbd1f Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Fri, 7 Feb 2020 00:21:25 +0100 Subject: Fix test issues on i386 Fix a few issues of #1906 found when running the test suite on Ubuntu 16.04 with gcc 5.5 -m32. When applied on top of the fix of #1912, make check succeeds --- src/projections/laea.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/projections/laea.cpp') diff --git a/src/projections/laea.cpp b/src/projections/laea.cpp index a1e4bf8f..3d135864 100644 --- a/src/projections/laea.cpp +++ b/src/projections/laea.cpp @@ -44,7 +44,8 @@ static PJ_XY laea_e_forward (PJ_LP lp, PJ *P) { /* Ellipsoidal, forward if (Q->mode == OBLIQ || Q->mode == EQUIT) { sinb = q / Q->qp; - cosb = sqrt(1. - sinb * sinb); + const double cosb2 = 1. - sinb * sinb; + cosb = cosb2 > 0 ? sqrt(cosb2) : 0; } switch (Q->mode) { -- cgit v1.2.3