From: Jim Meyering Date: Sun, 25 Jan 2009 09:50:00 +0000 (+0100) Subject: c-strtod: avoid warnings X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6d751259a21cbc6d4a95ea0fe454df2bfcca59d;p=pspp c-strtod: avoid warnings * lib/c-strtod.c (C_STRTOD): Cast nptr to (char *) to avoid "assignment discards qualifiers from pointer target type" warnings. --- diff --git a/ChangeLog b/ChangeLog index 71fee8be8f..cd4ef9a3a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-25 Jim Meyering + + c-strtod: avoid warnings + * lib/c-strtod.c (C_STRTOD): Cast nptr to (char *) to avoid + "assignment discards qualifiers from pointer target type" warnings. + 2009-01-24 Bruno Haible Add support for non-UTF-8 locales on MacOS X. diff --git a/lib/c-strtod.c b/lib/c-strtod.c index 9723e0b788..51e996e5da 100644 --- a/lib/c-strtod.c +++ b/lib/c-strtod.c @@ -73,7 +73,7 @@ C_STRTOD (char const *nptr, char **endptr) if (!locale) { if (endptr) - *endptr = nptr; + *endptr = (char *) nptr; return 0; /* errno is set here */ } @@ -89,7 +89,7 @@ C_STRTOD (char const *nptr, char **endptr) if (saved_locale == NULL) { if (endptr) - *endptr = nptr; + *endptr = (char *) nptr; return 0; /* errno is set here */ } setlocale (LC_NUMERIC, "C");