diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-05-29 22:45:18 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-05-30 11:48:28 +0200 |
| commit | f773897a3025438326c1131e1586d9ddae080c4f (patch) | |
| tree | 989e9619ac1f1ad140298bef5327df3f2d417d92 /src/nad2bin.c | |
| parent | e692e1567fb6117bd3e1380a80e10b72b7af3710 (diff) | |
| download | PROJ-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/nad2bin.c')
| -rw-r--r-- | src/nad2bin.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nad2bin.c b/src/nad2bin.c index dfc4e2dd..eb8672a5 100644 --- a/src/nad2bin.c +++ b/src/nad2bin.c @@ -119,7 +119,8 @@ int main(int argc, char **argv) { ct.del.lam *= DEG_TO_RAD; ct.del.phi *= DEG_TO_RAD; /* load table */ - for (p = ct.cvs, i = 0; i < ct.lim.phi; ++i) { + p = ct.cvs; + for (i = 0; i < ct.lim.phi; ++i) { /* cppcheck-suppress invalidscanf */ if ( EOF == scanf("%d:%ld %ld", &ichk, &laml, &phil) ) { perror("scanf on row"); |
