c-strtod: avoid warnings
authorJim Meyering <meyering@redhat.com>
Sun, 25 Jan 2009 09:50:00 +0000 (10:50 +0100)
committerJim Meyering <meyering@redhat.com>
Sun, 25 Jan 2009 09:50:50 +0000 (10:50 +0100)
* lib/c-strtod.c (C_STRTOD): Cast nptr to (char *) to avoid
"assignment discards qualifiers from pointer target type" warnings.

ChangeLog
lib/c-strtod.c

index 71fee8b..cd4ef9a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-25  Jim Meyering  <meyering@redhat.com>
+
+       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  <bruno@clisp.org>
 
        Add support for non-UTF-8 locales on MacOS X.
index 9723e0b..51e996e 100644 (file)
@@ -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");