diff Python/pystrtod.c @ 36080:10440bcfa061 legacy-trunk

Fix compiler warnings
author Neal Norwitz <nnorwitz@gmail.com>
date Sun, 18 Dec 2005 05:37:36 +0000
parents 3b90258fec9f
children ded4a497eb76
line wrap: on
line diff
--- a/Python/pystrtod.c	Sun Dec 18 05:32:41 2005 +0000
+++ b/Python/pystrtod.c	Sun Dec 18 05:37:36 2005 +0000
@@ -41,7 +41,7 @@
 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 @@
 		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);
 	}