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 /parse.c | |
parent | e7a387585992a9378ba2f2319c2408c62a0b14e8 (diff) | |
download | roux-f1c865f4bc7dff5a5d844049a73ad82463186e9f.tar.gz |
more compiler warnings...
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 9 |
1 files changed, 4 insertions, 5 deletions
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; |