commit 09192cdeabeb185e54d60faa2b275a0e8e2a52a6
parent 490799b7725f9a173fec6945c7dd927dd9aa5801
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Wed, 17 Aug 2016 23:45:28 -0700
silent a few warnings
Diffstat:
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/all.h b/all.h
@@ -434,9 +434,8 @@ struct Typ {
Sint,
Sflt,
Styp,
- };
- uint type:3;
- uint len:29; /* index in typ[] for Styp */
+ } type;
+ uint len; /* index in typ[] for Styp */
} (*seg)[NSeg+1];
};
diff --git a/sysv.c b/sysv.c
@@ -26,8 +26,10 @@ classify(AClass *a, Typ *t, int *pn, int *pe)
seg = t->seg[n];
for (s=0; *pe<2; (*pe)++) {
cls = &a->cls[*pe];
- for (; *pn<8 && seg[s].type!=Send; s++) {
+ for (; *pn<8; s++) {
switch (seg[s].type) {
+ case Send:
+ goto Done;
case Spad:
/* don't change anything */
break;
@@ -44,6 +46,7 @@ classify(AClass *a, Typ *t, int *pn, int *pe)
}
*pn += seg[s].len;
}
+ Done:
assert(*pn <= 8);
*pn = 0;
}