aboutsummaryrefslogtreecommitdiff
path: root/src/geodesic.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/geodesic.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/geodesic.c')
-rw-r--r--src/geodesic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/geodesic.c b/src/geodesic.c
index 3fcfd1c9..220dcd7f 100644
--- a/src/geodesic.c
+++ b/src/geodesic.c
@@ -932,8 +932,9 @@ static real geod_geninverse_int(const struct geod_geodesic* g,
unsigned numit = 0;
/* Bracketing range */
real salp1a = tiny, calp1a = 1, salp1b = tiny, calp1b = -1;
- boolx tripn, tripb;
- for (tripn = FALSE, tripb = FALSE; numit < maxit2; ++numit) {
+ boolx tripn = FALSE;
+ boolx tripb = FALSE;
+ for (; numit < maxit2; ++numit) {
/* the WGS84 test set: mean = 1.47, sd = 1.25, max = 16
* WGS84 and random input: mean = 2.85, sd = 0.60 */
real dv = 0,