Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e7a0ed

Browse files
committed
Fix compiler warnings
1 parent 4e6bf49 commit 0e7a0ed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/pystrtod.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ double
4141
PyOS_ascii_strtod(const char *nptr, char **endptr)
4242
{
4343
char *fail_pos;
44-
double val;
44+
double val = -1.0;
4545
struct lconv *locale_data;
4646
const char *decimal_point;
4747
int decimal_point_len;
@@ -130,7 +130,7 @@ PyOS_ascii_strtod(const char *nptr, char **endptr)
130130
if (nptr[i] == '-')
131131
i++;
132132
if (nptr[i] == '0' && (nptr[i+1] == 'x' || nptr[i+1] == 'X'))
133-
fail_pos = nptr;
133+
fail_pos = (char*)nptr;
134134
else
135135
val = strtod(nptr, &fail_pos);
136136
}

0 commit comments

Comments
 (0)