Mon Apr 17 12:46:00 2000 Marek Michalkiewicz <marekm@linux.org.pl>
* libc/signal/signal.c (_signal_r) : Removed unused local variable temp. * libc/stdio/findfp.c (std): Added declaration of flags and file. * libc/stdio/mktemp.c (_gettemp, _mkstemp_r, mkstemp): Added int return type. * libc/stdio/putchar.c (putchar): Added return statement. * libc/stdio/refill.c (lflush): Added correct parentheses. * libc/stdio/vfprintf.c (_VFPRINTF_R): Ditto. * libc/stdio/vfscanf.c (__svfscanf): Changed sprintf call which prints long value to use l qualifier. * libc/stdlib/dtoa.c (_dtoa_r): Added parentheses to remove warning messages and initialized local values: ilim, ilim1, and spec_case. * libc/stdlib/ecvtbuf.c (print_e): Removed unused variable dp. * libc/stdlib/mbctype.h (_issjis1, _issjis2): Added parentheses. * libc/stdlib/mprec.c: Ditto. * libc/stdlib/setenv_r.c: Ditto. * libc/stdlib/strtod.c: Ditto. * libc/stdlib/strtol.c: Ditto. * libc/stdlib/strtoul.c: Ditto. * libm/common/sf_expm1.c: Added curly braces to if else clauses. * libm/common/sf_log1p.c: Ditto. * libm/common/sf_scalbn.c: Ditto. * libm/math/ef_log.c: Ditto.
This commit is contained in:
@ -291,7 +291,7 @@ _DEFUN (_dtoa_r,
|
||||
#ifdef Sudden_Underflow
|
||||
i = (int) (word0 (d) >> Exp_shift1 & (Exp_mask >> Exp_shift1));
|
||||
#else
|
||||
if (i = (int) (word0 (d) >> Exp_shift1 & (Exp_mask >> Exp_shift1)))
|
||||
if ((i = (int) (word0 (d) >> Exp_shift1 & (Exp_mask >> Exp_shift1))) != 0)
|
||||
{
|
||||
#endif
|
||||
d2.d = d.d;
|
||||
@ -337,8 +337,8 @@ _DEFUN (_dtoa_r,
|
||||
/* d is denormalized */
|
||||
|
||||
i = bbits + be + (Bias + (P - 1) - 1);
|
||||
x = i > 32 ? word0 (d) << 64 - i | word1 (d) >> i - 32
|
||||
: word1 (d) << 32 - i;
|
||||
x = (i > 32) ? (word0 (d) << (64 - i)) | (word1 (d) >> (i - 32))
|
||||
: (word1 (d) << (32 - i));
|
||||
d2.d = x;
|
||||
word0 (d2) -= 31 * Exp_msk1; /* adjust exponent */
|
||||
i -= (Bias + (P - 1) - 1) + 1;
|
||||
@ -388,11 +388,11 @@ _DEFUN (_dtoa_r,
|
||||
try_quick = 0;
|
||||
}
|
||||
leftright = 1;
|
||||
ilim = ilim1 = -1;
|
||||
switch (mode)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
ilim = ilim1 = -1;
|
||||
i = 18;
|
||||
ndigits = 0;
|
||||
break;
|
||||
@ -449,7 +449,7 @@ _DEFUN (_dtoa_r,
|
||||
}
|
||||
d.d /= ds;
|
||||
}
|
||||
else if (j1 = -k)
|
||||
else if ((j1 = -k) != 0)
|
||||
{
|
||||
d.d *= tens[j1 & 0xf];
|
||||
for (j = j1 >> 4; j; j >>= 1, i++)
|
||||
@ -564,7 +564,7 @@ _DEFUN (_dtoa_r,
|
||||
if (i == ilim)
|
||||
{
|
||||
d.d += d.d;
|
||||
if (d.d > ds || d.d == ds && L & 1)
|
||||
if ((d.d > ds) || ((d.d == ds) && (L & 1)))
|
||||
{
|
||||
bump_up:
|
||||
while (*--s == '9')
|
||||
@ -640,7 +640,7 @@ _DEFUN (_dtoa_r,
|
||||
Bfree (ptr, b);
|
||||
b = b1;
|
||||
}
|
||||
if (j = b5 - m5)
|
||||
if ((j = b5 - m5) != 0)
|
||||
b = pow5mult (ptr, b, j);
|
||||
}
|
||||
else
|
||||
@ -652,6 +652,7 @@ _DEFUN (_dtoa_r,
|
||||
|
||||
/* Check for special case that d is a normalized power of 2. */
|
||||
|
||||
spec_case = 0;
|
||||
if (mode < 2)
|
||||
{
|
||||
if (!word1 (d) && !(word0 (d) & Bndry_mask)
|
||||
@ -665,8 +666,6 @@ _DEFUN (_dtoa_r,
|
||||
s2 += Log2P;
|
||||
spec_case = 1;
|
||||
}
|
||||
else
|
||||
spec_case = 0;
|
||||
}
|
||||
|
||||
/* Arrange for convenient computation of quotients:
|
||||
@ -678,10 +677,10 @@ _DEFUN (_dtoa_r,
|
||||
*/
|
||||
|
||||
#ifdef Pack_32
|
||||
if (i = ((s5 ? 32 - hi0bits (S->_x[S->_wds - 1]) : 1) + s2) & 0x1f)
|
||||
if ((i = ((s5 ? 32 - hi0bits (S->_x[S->_wds - 1]) : 1) + s2) & 0x1f) != 0)
|
||||
i = 32 - i;
|
||||
#else
|
||||
if (i = ((s5 ? 32 - hi0bits (S->_x[S->_wds - 1]) : 1) + s2) & 0xf)
|
||||
if ((i = ((s5 ? 32 - hi0bits (S->_x[S->_wds - 1]) : 1) + s2) & 0xf) != 0)
|
||||
i = 16 - i;
|
||||
#endif
|
||||
if (i > 4)
|
||||
@ -765,17 +764,17 @@ _DEFUN (_dtoa_r,
|
||||
goto ret;
|
||||
}
|
||||
#endif
|
||||
if (j < 0 || j == 0 && !mode
|
||||
if ((j < 0) || ((j == 0) && !mode
|
||||
#ifndef ROUND_BIASED
|
||||
&& !(word1 (d) & 1)
|
||||
#endif
|
||||
)
|
||||
))
|
||||
{
|
||||
if (j1 > 0)
|
||||
{
|
||||
b = lshift (ptr, b, 1);
|
||||
j1 = cmp (b, S);
|
||||
if ((j1 > 0 || j1 == 0 && dig & 1)
|
||||
if (((j1 > 0) || ((j1 == 0) && (dig & 1)))
|
||||
&& dig++ == '9')
|
||||
goto round_9_up;
|
||||
}
|
||||
@ -819,7 +818,7 @@ _DEFUN (_dtoa_r,
|
||||
|
||||
b = lshift (ptr, b, 1);
|
||||
j = cmp (b, S);
|
||||
if (j > 0 || j == 0 && dig & 1)
|
||||
if ((j > 0) || ((j == 0) && (dig & 1)))
|
||||
{
|
||||
roundoff:
|
||||
while (*--s == '9')
|
||||
|
@ -151,7 +151,6 @@ _DEFUN (print_e, (ptr, buf, invalue, width, type, dot),
|
||||
char type _AND
|
||||
int dot)
|
||||
{
|
||||
int dp;
|
||||
int sign;
|
||||
char *end;
|
||||
char *p;
|
||||
|
@ -12,8 +12,8 @@ int _EXFUN(_issjis2, (int c));
|
||||
int _EXFUN(_iseucjp, (int c));
|
||||
int _EXFUN(_isjis, (int c));
|
||||
|
||||
#define _issjis1(c) ((c) >= 0x81 && (c) <= 0x9f || (c) >= 0xe0 && (c) <= 0xef)
|
||||
#define _issjis2(c) ((c) >= 0x40 && (c) <= 0x7e || (c) >= 0x80 && (c) <= 0xfc)
|
||||
#define _issjis1(c) (((c) >= 0x81 && (c) <= 0x9f) || ((c) >= 0xe0 && (c) <= 0xef))
|
||||
#define _issjis2(c) (((c) >= 0x40 && (c) <= 0x7e) || ((c) >= 0x80 && (c) <= 0xfc))
|
||||
#define _iseucjp(c) ((c) >= 0xa1 && (c) <= 0xfe)
|
||||
#define _isjis(c) ((c) >= 0x21 && (c) <= 0x7e)
|
||||
|
||||
|
@ -107,7 +107,7 @@ _DEFUN (Balloc, (ptr, k), struct _reent *ptr _AND int k)
|
||||
}
|
||||
}
|
||||
|
||||
if (rv = ptr->_freelist[k])
|
||||
if ((rv = ptr->_freelist[k]) != 0)
|
||||
{
|
||||
ptr->_freelist[k] = rv->_next;
|
||||
}
|
||||
@ -354,7 +354,7 @@ _DEFUN (mult, (ptr, a, b), struct _reent * ptr _AND _Bigint * a _AND _Bigint * b
|
||||
#ifdef Pack_32
|
||||
for (; xb < xbe; xb++, xc0++)
|
||||
{
|
||||
if (y = *xb & 0xffff)
|
||||
if ((y = *xb & 0xffff) != 0)
|
||||
{
|
||||
x = xa;
|
||||
xc = xc0;
|
||||
@ -370,7 +370,7 @@ _DEFUN (mult, (ptr, a, b), struct _reent * ptr _AND _Bigint * a _AND _Bigint * b
|
||||
while (x < xae);
|
||||
*xc = carry;
|
||||
}
|
||||
if (y = *xb >> 16)
|
||||
if ((y = *xb >> 16) != 0)
|
||||
{
|
||||
x = xa;
|
||||
xc = xc0;
|
||||
@ -420,7 +420,7 @@ _DEFUN (pow5mult,
|
||||
int i;
|
||||
static _CONST int p05[3] = {5, 25, 125};
|
||||
|
||||
if (i = k & 3)
|
||||
if ((i = k & 3) != 0)
|
||||
b = multadd (ptr, b, p05[i - 1], 0);
|
||||
|
||||
if (!(k >>= 2))
|
||||
@ -484,7 +484,7 @@ _DEFUN (lshift, (ptr, b, k), struct _reent * ptr _AND _Bigint * b _AND int k)
|
||||
z = *x++ >> k1;
|
||||
}
|
||||
while (x < xe);
|
||||
if (*x1 = z)
|
||||
if ((*x1 = z) != 0)
|
||||
++n1;
|
||||
}
|
||||
#else
|
||||
@ -697,17 +697,17 @@ _DEFUN (b2d, (a, e),
|
||||
#ifdef Pack_32
|
||||
if (k < Ebits)
|
||||
{
|
||||
d0 = Exp_1 | y >> Ebits - k;
|
||||
d0 = Exp_1 | y >> (Ebits - k);
|
||||
w = xa > xa0 ? *--xa : 0;
|
||||
#ifndef _DOUBLE_IS_32BITS
|
||||
d1 = y << (32 - Ebits) + k | w >> Ebits - k;
|
||||
d1 = y << ((32 - Ebits) + k) | w >> (Ebits - k);
|
||||
#endif
|
||||
goto ret_d;
|
||||
}
|
||||
z = xa > xa0 ? *--xa : 0;
|
||||
if (k -= Ebits)
|
||||
{
|
||||
d0 = Exp_1 | y << k | z >> 32 - k;
|
||||
d0 = Exp_1 | y << k | z >> (32 - k);
|
||||
y = xa > xa0 ? *--xa : 0;
|
||||
#ifndef _DOUBLE_IS_32BITS
|
||||
d1 = z << k | y >> 32 - k;
|
||||
@ -789,7 +789,7 @@ _DEFUN (d2b,
|
||||
z |= Exp_msk11;
|
||||
#endif
|
||||
#else
|
||||
if (de = (int) (d0 >> Exp_shift))
|
||||
if ((de = (int) (d0 >> Exp_shift)) != 0)
|
||||
z |= Exp_msk1;
|
||||
#endif
|
||||
#ifdef Pack_32
|
||||
|
@ -64,7 +64,7 @@ _DEFUN (_setenv_r, (reent_ptr, name, value, rewrite),
|
||||
}
|
||||
if (strlen (C) >= l_value)
|
||||
{ /* old larger; copy over */
|
||||
while (*C++ = *value++);
|
||||
while ((*C++ = *value++) != 0);
|
||||
ENV_UNLOCK;
|
||||
return 0;
|
||||
}
|
||||
@ -108,7 +108,7 @@ _DEFUN (_setenv_r, (reent_ptr, name, value, rewrite),
|
||||
return -1;
|
||||
}
|
||||
for (C = environ[offset]; (*C = *name++) && *C != '='; ++C);
|
||||
for (*C++ = '='; *C++ = *value++;);
|
||||
for (*C++ = '='; (*C++ = *value++) != 0;);
|
||||
|
||||
ENV_UNLOCK;
|
||||
|
||||
|
@ -316,7 +316,7 @@ dig_done:
|
||||
|
||||
if (e1 > 0)
|
||||
{
|
||||
if (i = e1 & 15)
|
||||
if ((i = e1 & 15) != 0)
|
||||
rv.d *= tens[i];
|
||||
if (e1 &= ~15)
|
||||
{
|
||||
@ -373,7 +373,7 @@ dig_done:
|
||||
else if (e1 < 0)
|
||||
{
|
||||
e1 = -e1;
|
||||
if (i = e1 & 15)
|
||||
if ((i = e1 & 15) != 0)
|
||||
rv.d /= tens[i];
|
||||
if (e1 &= ~15)
|
||||
{
|
||||
|
@ -194,7 +194,7 @@ _DEFUN (_strtol_r, (rptr, nptr, endptr, base),
|
||||
break;
|
||||
if (c >= base)
|
||||
break;
|
||||
if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
|
||||
if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
|
||||
any = -1;
|
||||
else {
|
||||
any = 1;
|
||||
|
@ -174,7 +174,7 @@ _DEFUN (_strtoul_r, (rptr, nptr, endptr, base),
|
||||
break;
|
||||
if (c >= base)
|
||||
break;
|
||||
if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
|
||||
if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
|
||||
any = -1;
|
||||
else {
|
||||
any = 1;
|
||||
|
Reference in New Issue
Block a user