From 98258282af54a8ec315aaa216d48f890dd09bbdf Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 12 Mar 2018 22:40:25 +0100 Subject: Remove useless code (the variable is updated, but no longer used in the loop, and reinitialized at the next iteration) (spotted by clang static analyzer) The bug dates back from the original commit of src/PJ_lsat.c src/PJ_misrsom.c has likely copied & pasted from PJ_lsat.c --- src/PJ_lsat.c | 2 -- src/PJ_misrsom.c | 2 -- 2 files changed, 4 deletions(-) (limited to 'src') diff --git a/src/PJ_lsat.c b/src/PJ_lsat.c index 4b77f3d6..7e1567e1 100644 --- a/src/PJ_lsat.c +++ b/src/PJ_lsat.c @@ -61,8 +61,6 @@ static XY e_forward (LP lp, PJ *P) { /* Ellipsoidal, forward */ sav = lampp; lamtp = lp.lam + Q->p22 * lampp; cl = cos(lamtp); - if (fabs(cl) < TOL) - lamtp -= TOL; if( cl < 0 ) fac = lampp + sin(lampp) * M_HALFPI; else diff --git a/src/PJ_misrsom.c b/src/PJ_misrsom.c index c25ca597..b9b97117 100644 --- a/src/PJ_misrsom.c +++ b/src/PJ_misrsom.c @@ -78,8 +78,6 @@ static XY e_forward (LP lp, PJ *P) { /* Ellipsoidal, forward */ sav = lampp; lamtp = lp.lam + Q->p22 * lampp; cl = cos(lamtp); - if (fabs(cl) < TOL) - lamtp -= TOL; if( cl < 0 ) fac = lampp + sin(lampp) * M_HALFPI; else -- cgit v1.2.3