lbitbits.c (lbit_cshift): disambiguate expressions with parentheses.

* libF77/lbitbits.c (lbit_cshift): disambiguate expressions
	with parentheses.
	* libF77/qbitbits.c (qbit_cshift): Likewise.
	* libI77/inquire.c (f_inqu): Likewise.
	* libI77/rdfmt.c (rd_Z): Likewise.
	* libI77/rsne.c (x_rsne): Likewise.

From-SVN: r54223
This commit is contained in:
Kaveh R. Ghazi 2002-06-04 02:24:26 +00:00 committed by Kaveh Ghazi
parent 467e9325d4
commit ac1db652a0
6 changed files with 22 additions and 13 deletions

View File

@ -1,3 +1,12 @@
Mon Jun 3 22:23:03 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libF77/lbitbits.c (lbit_cshift): disambiguate expressions
with parentheses.
* libF77/qbitbits.c (qbit_cshift): Likewise.
* libI77/inquire.c (f_inqu): Likewise.
* libI77/rdfmt.c (rd_Z): Likewise.
* libI77/rsne.c (x_rsne): Likewise.
Mon Jun 3 22:21:23 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (s-libe77): Add WARN_CFLAGS.

View File

@ -36,11 +36,11 @@ lbit_cshift (integer a, integer b, integer len)
if (b >= 0)
{
b %= LONGBITS;
return (integer) (x << b | x >> LONGBITS - b);
return (integer) (x << b | x >> (LONGBITS - b));
}
b = -b;
b %= LONGBITS;
return (integer) (x << LONGBITS - b | x >> b);
return (integer) (x << (LONGBITS - b) | x >> b);
}
y = z = (unsigned long) -1;
y <<= len;
@ -50,9 +50,9 @@ lbit_cshift (integer a, integer b, integer len)
if (b >= 0)
{
b %= len;
return (integer) (y | z & (x << b | x >> len - b));
return (integer) (y | (z & (x << b | x >> (len - b))));
}
b = -b;
b %= len;
return (integer) (y | z & (x >> b | x << len - b));
return (integer) (y | (z & (x >> b | x << (len - b))));
}

View File

@ -40,11 +40,11 @@ qbit_cshift (longint a, integer b, integer len)
if (b >= 0)
{
b %= LONG8BITS;
return (longint) (x << b | x >> LONG8BITS - b);
return (longint) (x << b | x >> (LONG8BITS - b));
}
b = -b;
b %= LONG8BITS;
return (longint) (x << LONG8BITS - b | x >> b);
return (longint) (x << (LONG8BITS - b) | x >> b);
}
y = z = (unsigned long) -1;
y <<= len;
@ -54,9 +54,9 @@ qbit_cshift (longint a, integer b, integer len)
if (b >= 0)
{
b %= len;
return (longint) (y | z & (x << b | x >> len - b));
return (longint) (y | (z & (x << b | x >> (len - b))));
}
b = -b;
b %= len;
return (longint) (y | z & (x >> b | x << len - b));
return (longint) (y | (z & (x >> b | x << (len - b))));
}

View File

@ -56,7 +56,7 @@ f_inqu (inlist * a)
}
if (a->inex != NULL)
{
if (byfile && x != -1 || !byfile && p != NULL)
if ((byfile && x != -1) || (!byfile && p != NULL))
*a->inex = 1;
else
*a->inex = 0;
@ -72,7 +72,7 @@ f_inqu (inlist * a)
*a->innum = p - f__units;
if (a->innamed != NULL)
{
if (byfile || p != NULL && p->ufnm != NULL)
if (byfile || (p != NULL && p->ufnm != NULL))
*a->innamed = 1;
else
*a->innamed = 0;

View File

@ -60,7 +60,7 @@ rd_Z (Uint * n, int w, ftnlen len)
return errno = 115;
w = (int) len;
w1 = s - s0;
w2 = w1 + 1 >> 1;
w2 = (w1 + 1) >> 1;
t = (char *) n;
if (*(char *) &one)
{
@ -85,7 +85,7 @@ rd_Z (Uint * n, int w, ftnlen len)
}
do
{
*t = hex[*s0 & 0xff] - 1 << 4 | hex[s0[1] & 0xff] - 1;
*t = (hex[*s0 & 0xff] - 1) << 4 | (hex[s0[1] & 0xff] - 1);
t += i;
s0 += 2;
}

View File

@ -368,7 +368,7 @@ have_amp:
case '&':
return 0;
default:
if (ch <= ' ' && ch >= 0 || ch == ',')
if ((ch <= ' ' && ch >= 0) || ch == ',')
continue;
Ungetc (ch, f__cf);
if ((ch = getname (buf, sizeof (buf))))