commit f1c865f4bc7dff5a5d844049a73ad82463186e9f
parent e7a387585992a9378ba2f2319c2408c62a0b14e8
Author: Quentin Carbonneaux <quentin@c9x.me>
Date: Thu, 26 Apr 2018 22:59:30 +0200
more compiler warnings...
Diffstat:
5 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/amd64/isel.c b/amd64/isel.c
@@ -538,6 +538,7 @@ amatch(Addr *a, Ref r, ANum *ai, Fn *fn, int top)
break;
}
r = al;
+ /* fall through */
case 0:
s = fn->tmp[r.val].slot;
if (s != -1)
diff --git a/arm64/abi.c b/arm64/abi.c
@@ -72,6 +72,7 @@ isfloatv(Typ *t, char *cls)
case FTyp:
if (isfloatv(&typ[f->len], cls))
break;
+ /* fall through */
default:
return 0;
}
diff --git a/load.c b/load.c
@@ -434,6 +434,7 @@ loadopt(Fn *fn)
i->op = ext;
break;
}
+ /* fall through */
case Oload:
i->op = Ocopy;
break;
diff --git a/mem.c b/mem.c
@@ -65,6 +65,7 @@ memopt(Fn *fn)
case Oloaduw:
if (k == Kl)
goto Extend;
+ /* fall through */
case Oload:
if (KBASE(k) != KBASE(l->cls))
l->op = Ocast;
diff --git a/parse.c b/parse.c
@@ -173,11 +173,9 @@ getint()
n = 0;
c = fgetc(inf);
- m = 0;
- switch (c) {
- case '-': m = 1;
- case '+': c = fgetc(inf);
- }
+ m = (c == '-');
+ if (m || c == '+')
+ c = fgetc(inf);
do {
n = 10*n + (c - '0');
c = fgetc(inf);
@@ -240,6 +238,7 @@ lex()
case '#':
while ((c=fgetc(inf)) != '\n' && c != EOF)
;
+ /* fall through */
case '\n':
lnum++;
return Tnl;