aboutsummaryrefslogtreecommitdiff
path: root/src/PJ_isea.c
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-02-26 00:22:03 +0100
committerEven Rouault <even.rouault@spatialys.com>2017-02-26 11:25:14 +0100
commit66e04bf4e5cdb27a44e9bea6bacad22c02df2f0d (patch)
treef148438285557a491088b4042a1dfab80f80d577 /src/PJ_isea.c
parentb288ee6bbc345baf2ef56aaec49184c34a6cd0dd (diff)
downloadPROJ-66e04bf4e5cdb27a44e9bea6bacad22c02df2f0d.tar.gz
PROJ-66e04bf4e5cdb27a44e9bea6bacad22c02df2f0d.zip
Fix warnings related to -Wshadow -Wnull-dereference -Wfloat-conversionr -Wmissing-prototypes -Wmissing-declarations
Diffstat (limited to 'src/PJ_isea.c')
-rw-r--r--src/PJ_isea.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/PJ_isea.c b/src/PJ_isea.c
index ab9a5a8c..cd87d565 100644
--- a/src/PJ_isea.c
+++ b/src/PJ_isea.c
@@ -75,9 +75,12 @@ int hexbin2(double width, double x, double y,
z = -x - y;
- ix = rx = floor(x + 0.5);
- iy = ry = floor(y + 0.5);
- iz = rz = floor(z + 0.5);
+ rx = floor(x + 0.5);
+ ix = (int)rx;
+ ry = floor(y + 0.5);
+ iy = (int)ry;
+ rz = floor(z + 0.5);
+ iz = (int)rz;
s = ix + iy + iz;
@@ -126,7 +129,7 @@ struct isea_dgg {
int triangle; /* triangle of last transformed point */
int quad; /* quad of last transformed point */
unsigned long serial;
-};
+};
struct isea_pt {
double x, y;
@@ -892,7 +895,7 @@ int isea_disn(struct isea_dgg *g, int quad, struct isea_pt *di) {
sn += 2;
} else {
sidelength = (int) (pow(g->aperture, g->resolution / 2.0) + 0.5);
- sn = (quad - 1) * hexes + sidelength * di->x + di->y + 2;
+ sn = (int) ((quad - 1) * hexes + sidelength * di->x + di->y + 2);
}
g->serial = sn;
@@ -918,8 +921,8 @@ int isea_hex(struct isea_dgg *g, int tri,
return 1;
- d = v.x;
- i = v.y;
+ d = (int)v.x;
+ i = (int)v.y;
/* Aperture 3 odd resolutions */
if (g->aperture == 3 && g->resolution % 2 != 0) {