Use nanf("") instead of nanf(NULL)
Newer GCC versions require a non-NULL argument to this function for some reason. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
9e032fd939
commit
2c245028af
|
@ -330,7 +330,7 @@ fskip:
|
|||
{
|
||||
flp = GET_ARG (N, *ap, float *);
|
||||
if (isnan (fp))
|
||||
*flp = nanf (NULL);
|
||||
*flp = nanf ("");
|
||||
else
|
||||
*flp = fp;
|
||||
}
|
||||
|
|
|
@ -1886,7 +1886,7 @@ __SVFSCANF_R (struct _reent *rptr,
|
|||
{
|
||||
flp = GET_ARG (N, ap, float *);
|
||||
if (isnan (res))
|
||||
*flp = nanf (NULL);
|
||||
*flp = nanf ("");
|
||||
else
|
||||
*flp = res;
|
||||
}
|
||||
|
|
|
@ -1636,7 +1636,7 @@ __SVFWSCANF_R (struct _reent *rptr,
|
|||
{
|
||||
flp = GET_ARG (N, ap, float *);
|
||||
if (isnan (res))
|
||||
*flp = nanf (NULL);
|
||||
*flp = nanf ("");
|
||||
else
|
||||
*flp = res;
|
||||
}
|
||||
|
|
|
@ -1289,7 +1289,7 @@ strtof_l (const char *__restrict s00, char **__restrict se, locale_t loc)
|
|||
{
|
||||
double val = _strtod_l (_REENT, s00, se, loc);
|
||||
if (isnan (val))
|
||||
return signbit (val) ? -nanf (NULL) : nanf (NULL);
|
||||
return signbit (val) ? -nanf ("") : nanf ("");
|
||||
float retval = (float) val;
|
||||
#ifndef NO_ERRNO
|
||||
if (isinf (retval) && !isinf (val))
|
||||
|
@ -1304,7 +1304,7 @@ strtof (const char *__restrict s00,
|
|||
{
|
||||
double val = _strtod_l (_REENT, s00, se, __get_current_locale ());
|
||||
if (isnan (val))
|
||||
return signbit (val) ? -nanf (NULL) : nanf (NULL);
|
||||
return signbit (val) ? -nanf ("") : nanf ("");
|
||||
float retval = (float) val;
|
||||
#ifndef NO_ERRNO
|
||||
if (isinf (retval) && !isinf (val))
|
||||
|
|
|
@ -228,7 +228,7 @@ _wcstof_r (struct _reent *ptr,
|
|||
{
|
||||
double retval = _wcstod_l (ptr, nptr, endptr, __get_current_locale ());
|
||||
if (isnan (retval))
|
||||
return nanf (NULL);
|
||||
return nanf ("");
|
||||
return (float)retval;
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ wcstof_l (const wchar_t *__restrict nptr, wchar_t **__restrict endptr,
|
|||
{
|
||||
double val = _wcstod_l (_REENT, nptr, endptr, loc);
|
||||
if (isnan (val))
|
||||
return nanf (NULL);
|
||||
return nanf ("");
|
||||
float retval = (float) val;
|
||||
#ifndef NO_ERRNO
|
||||
if (isinf (retval) && !isinf (val))
|
||||
|
@ -268,7 +268,7 @@ wcstof (const wchar_t *__restrict nptr,
|
|||
{
|
||||
double val = _wcstod_l (_REENT, nptr, endptr, __get_current_locale ());
|
||||
if (isnan (val))
|
||||
return nanf (NULL);
|
||||
return nanf ("");
|
||||
float retval = (float) val;
|
||||
#ifndef NO_ERRNO
|
||||
if (isinf (retval) && !isinf (val))
|
||||
|
|
Loading…
Reference in New Issue