aboutsummaryrefslogtreecommitdiffstats
path: root/lcc/src/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'lcc/src/init.c')
-rw-r--r--lcc/src/init.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lcc/src/init.c b/lcc/src/init.c
index 27bbc51..172d7c0 100644
--- a/lcc/src/init.c
+++ b/lcc/src/init.c
@@ -81,7 +81,7 @@ static int initarray(int len, Type ty, int lev) {
do {
initializer(ty, lev);
n += ty->size;
- if (len > 0 && n >= len || t != ',')
+ if ((len > 0 && n >= len) || t != ',')
break;
t = gettok();
} while (t != '}');
@@ -99,7 +99,7 @@ static int initchar(int len, Type ty) {
(*IR->defstring)(inttype->size, buf);
s = buf;
}
- if (len > 0 && n >= len || t != ',')
+ if ((len > 0 && n >= len) || t != ',')
break;
t = gettok();
} while (t != '}');
@@ -123,9 +123,9 @@ static int initfields(Field p, Field q) {
do {
i = initvalue(inttype)->u.v.i;
if (fieldsize(p) < 8*p->type->size) {
- if (p->type == inttype &&
- (i < -(int)(fieldmask(p)>>1)-1 || i > (int)(fieldmask(p)>>1))
- || p->type == unsignedtype && (i&~fieldmask(p)) != 0)
+ if ((p->type == inttype &&
+ (i < -(int)(fieldmask(p)>>1)-1 || i > (int)(fieldmask(p)>>1)))
+ || (p->type == unsignedtype && (i&~fieldmask(p)) != 0))
warning("initializer exceeds bit-field width\n");
i &= fieldmask(p);
}
@@ -185,7 +185,7 @@ static int initstruct(int len, Type ty, int lev) {
(*IR->space)(a - n%a);
n = roundup(n, a);
}
- if (len > 0 && n >= len || t != ',')
+ if ((len > 0 && n >= len) || t != ',')
break;
t = gettok();
} while (t != '}');