diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2015-01-11 17:30:25 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2015-01-11 17:30:25 +0000 |
commit | 06e361dbf279e93a137b77e0c1b0d19afc0060ba (patch) | |
tree | 420c13c58a8a6aef7bba6b4896c9f888d8dd0ed4 | |
parent | 679f9395bc6706c5b438dbb227fbccaaaa599324 (diff) | |
download | swig-06e361dbf279e93a137b77e0c1b0d19afc0060ba.tar.gz |
Fix linux gcc warnings and strtol corrections
-rw-r--r-- | Source/Modules/php.cxx | 4 | ||||
-rw-r--r-- | Source/Modules/python.cxx | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index efeb4dcc4..620966a58 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -1268,7 +1268,7 @@ public: break; char *p; errno = 0; - int n = strtol(Char(value), &p, 0); + long n = strtol(Char(value), &p, 0); Clear(value); if (errno || *p) { Append(value, "?"); @@ -1286,7 +1286,7 @@ public: case T_LONG: { char *p; errno = 0; - unsigned int n = strtol(Char(value), &p, 0); + long n = strtol(Char(value), &p, 0); (void) n; if (errno || *p) { Clear(value); diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index ed19e0b46..00eec707a 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -1825,7 +1825,8 @@ public: const char *const s = Char(v); char *end; - (void)strtod(s, &end); + double value = strtod(s, &end); + (void) value; if (errno != ERANGE && end != s) { // An added complication: at least some versions of strtod() recognize // hexadecimal floating point numbers which don't exist in Python, so @@ -1868,7 +1869,8 @@ public: char *end; // Check if this is a number in any base. - (void)strtol(s, &end, 0); + long value = strtol(s, &end, 0); + (void) value; if (end != s) { if (errno == ERANGE) { // There was an overflow, we could try representing the value as Python |