diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2018-04-26 22:59:30 +0200 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2018-04-26 22:59:30 +0200 |
commit | f1c865f4bc7dff5a5d844049a73ad82463186e9f (patch) | |
tree | 7b83c71a1ab77b86507b11f6e823d85eed4da397 | |
parent | e7a387585992a9378ba2f2319c2408c62a0b14e8 (diff) | |
download | roux-f1c865f4bc7dff5a5d844049a73ad82463186e9f.tar.gz |
more compiler warnings...
-rw-r--r-- | amd64/isel.c | 1 | ||||
-rw-r--r-- | arm64/abi.c | 1 | ||||
-rw-r--r-- | load.c | 1 | ||||
-rw-r--r-- | mem.c | 1 | ||||
-rw-r--r-- | parse.c | 9 |
5 files changed, 8 insertions, 5 deletions
diff --git a/amd64/isel.c b/amd64/isel.c index cb409c4..2519ae5 100644 --- 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 index 17ea1d1..1c97ef3 100644 --- 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 index 31d00bc..504b2d8 100644 --- 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 index 159b6bc..f20f378 100644 --- 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 index 592e079..3c4200e 100644 --- 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; |