int nbytes = 1; /* number of bytes read from fmt string */
wchar_t wc; /* wchar to use to read format string */
wchar_t *wcp; /* handy wide character pointer */
- size_t mbslen; /* length of converted multibyte sequence */
+ size_t mbslen = 0; /* length of converted multibyte sequence */
#ifdef _MB_CAPABLE
mbstate_t state; /* value to keep track of multibyte state */
#endif
static void esubm (short unsigned int *x, short unsigned int *y);
static void emdnorm (short unsigned int *s, int lost, int subflg,
long int exp, int rcntrl, LDPARMS * ldp);
+#if 0 /* Broken, unusable implementation of strtold */
static int asctoeg (char *ss, short unsigned int *y, int oprec,
LDPARMS * ldp);
+#endif
static void enan (short unsigned int *nan, int size);
#if LDBL_MANT_DIG == 24
static void toe24 (short unsigned int *x, short unsigned int *y);
/* move out internal format to ieee long double */
static void
+__attribute__ ((__unused__))
toe113 (short unsigned int *a, short unsigned int *b)
{
register unsigned short *p, *q;
/* move out internal format to ieee long double */
static void
+__attribute__ ((__unused__))
toe64 (short unsigned int *a, short unsigned int *b)
{
register unsigned short *p, *q;
}
static void
+__attribute__ ((__unused__))
toe53 (x, y)
unsigned short *x, *y;
{
#else
static void
+__attribute__ ((__unused__))
toe53 (short unsigned int *x, short unsigned int *y)
{
unsigned short i;
}
static void
+__attribute__ ((__unused__))
toe24 (short unsigned int *x, short unsigned int *y)
{
unsigned short i;
dval(rv) *= tens[i];
if (e1 &= ~15) {
e1 >>= 4;
- while(e1 >= (1 << n_bigtens-1)) {
+ while(e1 >= (1 << (n_bigtens-1))) {
e2 += ((word0(rv) & Exp_mask)
>> Exp_shift1) - Bias;
word0(rv) &= ~Exp_mask;
word0(rv) |= Bias << Exp_shift1;
dval(rv) *= bigtens[n_bigtens-1];
- e1 -= 1 << n_bigtens-1;
+ e1 -= 1 << (n_bigtens-1);
}
e2 += ((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;
word0(rv) &= ~Exp_mask;
dval(rv) /= tens[i];
if (e1 &= ~15) {
e1 >>= 4;
- while(e1 >= (1 << n_bigtens-1)) {
+ while(e1 >= (1 << (n_bigtens-1))) {
e2 += ((word0(rv) & Exp_mask)
>> Exp_shift1) - Bias;
word0(rv) &= ~Exp_mask;
word0(rv) |= Bias << Exp_shift1;
dval(rv) *= tinytens[n_bigtens-1];
- e1 -= 1 << n_bigtens-1;
+ e1 -= 1 << (n_bigtens-1);
}
e2 += ((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;
word0(rv) &= ~Exp_mask;
}
else
irv = STRTOG_Normal | STRTOG_Inexhi;
- if (bbbits < nbits && !denorm || !(rvb->_x[0] & 1))
+ if ((bbbits < nbits && !denorm) || !(rvb->_x[0] & 1))
break;
if (dsign) {
rvb = increment(p, rvb);
_strtoimax_l(struct _reent *rptr, const char * __restrict nptr,
char ** __restrict endptr, int base, locale_t loc)
{
- const char *s = (const unsigned char *)nptr;
- uintmax_t acc;
+ const char *s = nptr;
+ uintmax_t acc = 0;
char c;
uintmax_t cutoff;
- int neg = 0, any, cutlim;
+ int neg = 0, any = 0, cutlim;
/*
* Skip white space and pick up leading +/- sign if any.
acc = neg ? INTMAX_MIN : INTMAX_MAX;
rptr->_errno = ERANGE;
} else if (!any) {
-noconv:
rptr->_errno = EINVAL;
} else if (neg)
acc = -acc;
_strtoumax_l(struct _reent *rptr, const char * __restrict nptr,
char ** __restrict endptr, int base, locale_t loc)
{
- const char *s = (const unsigned char *)nptr;
+ const char *s = nptr;
uintmax_t acc;
char c;
uintmax_t cutoff;
# error "YEAR_BASE < 0"
#endif
-static const int dname_len[7] =
-{6, 6, 7, 9, 8, 6, 8};
-
/* Using the tm_year, tm_wday, and tm_yday components of TIM_P, return
-1, 0, or 1 as the adjustment to add to the year for the ISO week
numbering used in "%g%G%V", avoiding overflow. */
volatile double y = x;
return y;
}
+#pragma GCC diagnostic ignored "-Wunused-variable"
static inline void
force_eval_float (float x)
{
{
volatile double y = x;
}
+#pragma GCC diagnostic pop
#endif
/* Evaluate an expression as the specified type, normally a type
sqrtl (long double x)
{
union ieee_ext_u ux = { .extu_ld = x, };
- int k, r;
+ int k;
long double lo, xn;
/* If x = NaN, then sqrt(x) = NaN. */
#else
static float
#endif
-invsqrtpi= 5.6418961287e-01, /* 0x3f106ebb */
two = 2.0000000000e+00, /* 0x40000000 */
one = 1.0000000000e+00; /* 0x3F800000 */
/* compute q[0],q[1],...q[jk] */
for (i=0;i<=jk;i++) {
- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
+ for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j];
+ q[i] = fw;
}
jz = jk;
/* compute q[0],q[1],...q[jk] */
for (i=0;i<=jk;i++) {
- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
+ for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j];
+ q[i] = fw;
}
jz = jk;