summaryrefslogtreecommitdiffstats
path: root/Python/pystrtod.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2005-12-18 05:37:36 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2005-12-18 05:37:36 (GMT)
commit0e7a0ed335b464eb82e2b06f334566fe6d35226a (patch)
tree07bcbd7a46d4c6e79935cba998052dbe2b5f8320 /Python/pystrtod.c
parent4e6bf49a5e76fdb11ab5f0b8ea1be76630c112ce (diff)
downloadcpython-0e7a0ed335b464eb82e2b06f334566fe6d35226a.zip
cpython-0e7a0ed335b464eb82e2b06f334566fe6d35226a.tar.gz
cpython-0e7a0ed335b464eb82e2b06f334566fe6d35226a.tar.bz2
Fix compiler warnings
Diffstat (limited to 'Python/pystrtod.c')
-rw-r--r--Python/pystrtod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pystrtod.c b/Python/pystrtod.c
index 19f25da..85eda91 100644
--- a/Python/pystrtod.c
+++ b/Python/pystrtod.c
@@ -41,7 +41,7 @@ double
PyOS_ascii_strtod(const char *nptr, char **endptr)
{
char *fail_pos;
- double val;
+ double val = -1.0;
struct lconv *locale_data;
const char *decimal_point;
int decimal_point_len;
@@ -130,7 +130,7 @@ PyOS_ascii_strtod(const char *nptr, char **endptr)
if (nptr[i] == '-')
i++;
if (nptr[i] == '0' && (nptr[i+1] == 'x' || nptr[i+1] == 'X'))
- fail_pos = nptr;
+ fail_pos = (char*)nptr;
else
val = strtod(nptr, &fail_pos);
}