diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-03-12 21:23:26 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-03-14 18:51:50 +0100 |
| commit | 3ae126e05c9794a2883ee1613c215652f949a3f4 (patch) | |
| tree | c88432cb54e2357df4c46d65c99aa427c73f4a4b | |
| parent | 7ad9654a05451cb77e508cee00e45a695512a57c (diff) | |
| download | PROJ-3ae126e05c9794a2883ee1613c215652f949a3f4.tar.gz PROJ-3ae126e05c9794a2883ee1613c215652f949a3f4.zip | |
Fix 'Variable 'XXXX' is reassigned a value before the old one has been used' warnings
| -rw-r--r-- | src/PJ_imw_p.c | 4 | ||||
| -rw-r--r-- | src/PJ_ob_tran.c | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/PJ_imw_p.c b/src/PJ_imw_p.c index b731f656..c7939d3e 100644 --- a/src/PJ_imw_p.c +++ b/src/PJ_imw_p.c @@ -91,10 +91,8 @@ static XY loc_for(LP lp, PJ *P, double *yc) { static XY e_forward (LP lp, PJ *P) { /* Ellipsoidal, forward */ - XY xy = {0.0,0.0}; double yc; - - xy = loc_for(lp, P, &yc); + XY xy = loc_for(lp, P, &yc); return (xy); } diff --git a/src/PJ_ob_tran.c b/src/PJ_ob_tran.c index e6971138..8b13eb65 100644 --- a/src/PJ_ob_tran.c +++ b/src/PJ_ob_tran.c @@ -48,11 +48,11 @@ static XY t_forward(LP lp, PJ *P) { /* spheroid */ static LP o_inverse(XY xy, PJ *P) { /* spheroid */ - LP lp = {0.0,0.0}; + struct pj_opaque *Q = P->opaque; double coslam, sinphi, cosphi; - lp = Q->link->inv(xy, Q->link); + LP lp = Q->link->inv(xy, Q->link); if (lp.lam != HUGE_VAL) { coslam = cos(lp.lam -= Q->lamp); sinphi = sin(lp.phi); @@ -66,11 +66,11 @@ static LP o_inverse(XY xy, PJ *P) { /* spheroid */ static LP t_inverse(XY xy, PJ *P) { /* spheroid */ - LP lp = {0.0,0.0}; + struct pj_opaque *Q = P->opaque; double cosphi, t; - lp = Q->link->inv(xy, Q->link); + LP lp = Q->link->inv(xy, Q->link); if (lp.lam != HUGE_VAL) { cosphi = cos(lp.phi); t = lp.lam - Q->lamp; |
