# HG changeset patch # User Jim Meyering # Date 1232877000 -3600 # Node ID 96a37da9a3e275c97b6b03d138e9b693b1067ed9 # Parent bc5393a473617c6eaacdae62a9d39febb5b5a994 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 --- 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 --- a/lib/c-strtod.c +++ b/lib/c-strtod.c @@ -73,7 +73,7 @@ if (!locale) { if (endptr) - *endptr = nptr; + *endptr = (char *) nptr; return 0; /* errno is set here */ } @@ -89,7 +89,7 @@ if (saved_locale == NULL) { if (endptr) - *endptr = nptr; + *endptr = (char *) nptr; return 0; /* errno is set here */ } setlocale (LC_NUMERIC, "C");