aboutsummaryrefslogtreecommitdiff
path: root/src/PJ_poly.c
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-05-29 22:45:18 +0200
committerEven Rouault <even.rouault@spatialys.com>2018-05-30 11:48:28 +0200
commitf773897a3025438326c1131e1586d9ddae080c4f (patch)
tree989e9619ac1f1ad140298bef5327df3f2d417d92 /src/PJ_poly.c
parente692e1567fb6117bd3e1380a80e10b72b7af3710 (diff)
downloadPROJ-f773897a3025438326c1131e1586d9ddae080c4f.tar.gz
PROJ-f773897a3025438326c1131e1586d9ddae080c4f.zip
Fix warnings found by clang with new warning flags to be added in later commit
Fixes consist in: - no use of comma operator for multi statement purpose - avoid confusing comma in for loops first and third clauses - avoid implicit long to int casts by storing to long, or explicit bound checking before cast
Diffstat (limited to 'src/PJ_poly.c')
-rw-r--r--src/PJ_poly.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/PJ_poly.c b/src/PJ_poly.c
index 03fa84a4..b5f78fdf 100644
--- a/src/PJ_poly.c
+++ b/src/PJ_poly.c
@@ -71,7 +71,8 @@ static LP e_inverse (XY xy, PJ *P) { /* Ellipsoidal, inverse */
int i;
r = xy.y * xy.y + xy.x * xy.x;
- for (lp.phi = xy.y, i = I_ITER; i ; --i) {
+ lp.phi = xy.y;
+ for (i = I_ITER; i ; --i) {
sp = sin(lp.phi);
s2ph = sp * ( cp = cos(lp.phi));
if (fabs(cp) < ITOL) {