From 8c1598a932a0638c29118f6ab480802d82f9f137 Mon Sep 17 00:00:00 2001 From: Rijn Buve Date: Mon, 27 Jul 2015 14:57:04 +0200 Subject: [PATCH] Removed long to int warnings and unused variables --- utility/mapcode.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utility/mapcode.cpp b/utility/mapcode.cpp index bfe84bc..bc023df 100644 --- a/utility/mapcode.cpp +++ b/utility/mapcode.cpp @@ -47,7 +47,7 @@ #undef LIMIT_TO_MICRODEGREES #define my_isnan(x) (false) -#define my_round(x) ((long) (floor((x) + 0.5))) +#define my_round(x) ((int) (floor((x) + 0.5))) static int selfCheckEnabled = 0; @@ -456,7 +456,7 @@ int main(const int argc, const char** argv) const char* suffix = strstr(mapcode, "-"); extraDigits = 0; if (suffix != 0) { - extraDigits = strlen(suffix) - 1; + extraDigits = (int) (strlen(suffix) - 1); } selfCheckLatLonToMapcode(lat, lon, defaultTerritory, mapcode, extraDigits); } @@ -651,7 +651,7 @@ int main(const int argc, const char** argv) srand(seed); } else { - srand(time(0)); + srand((unsigned int) time(0)); } } useXYZ = (strstr(cmd, "XYZ") != 0);