+2010-08-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ strtod: fix const diagnostic
+ * lib/strtod.c (strtod): Don't assign const char * to char *,
+ as this elicits a warning from GCC when warnings are enabled.
+
2010-08-10 Pádraig Brady <P@draigbrady.com>
and Eric Blake <eblake@redhat.com>
double num;
const char *s = nptr;
- char *end;
+ const char *end;
+ char *endbuf;
/* Eat whitespace. */
while (locale_isspace (*s))
if (*s == '-' || *s == '+')
++s;
- num = underlying_strtod (s, &end);
+ num = underlying_strtod (s, &endbuf);
+ end = endbuf;
if (c_isdigit (s[*s == '.']))
{
if (! c_isxdigit (s[2 + (s[2] == '.')]))
end = s + 1;
else if (end <= s + 2)
- num = parse_number (s + 2, 16, 2, 4, 'p', &end);
+ {
+ num = parse_number (s + 2, 16, 2, 4, 'p', &endbuf);
+ end = endbuf;
+ }
else
{
const char *p = s + 2;