mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Fix compiler warnings
This commit is contained in:
parent
4e6bf49a5e
commit
0e7a0ed335
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ double
|
||||||
PyOS_ascii_strtod(const char *nptr, char **endptr)
|
PyOS_ascii_strtod(const char *nptr, char **endptr)
|
||||||
{
|
{
|
||||||
char *fail_pos;
|
char *fail_pos;
|
||||||
double val;
|
double val = -1.0;
|
||||||
struct lconv *locale_data;
|
struct lconv *locale_data;
|
||||||
const char *decimal_point;
|
const char *decimal_point;
|
||||||
int decimal_point_len;
|
int decimal_point_len;
|
||||||
|
@ -130,7 +130,7 @@ PyOS_ascii_strtod(const char *nptr, char **endptr)
|
||||||
if (nptr[i] == '-')
|
if (nptr[i] == '-')
|
||||||
i++;
|
i++;
|
||||||
if (nptr[i] == '0' && (nptr[i+1] == 'x' || nptr[i+1] == 'X'))
|
if (nptr[i] == '0' && (nptr[i+1] == 'x' || nptr[i+1] == 'X'))
|
||||||
fail_pos = nptr;
|
fail_pos = (char*)nptr;
|
||||||
else
|
else
|
||||||
val = strtod(nptr, &fail_pos);
|
val = strtod(nptr, &fail_pos);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue