diff options
author | Mark Wielaard <mjw@redhat.com> | 2016-11-02 13:29:26 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2016-11-10 11:59:00 +0100 |
commit | a3cc8182b2ae05290b0eafa74b70746d7befc0e4 (patch) | |
tree | 7d1f74f9f464b810a95dc7cd78c73930a938924a /libcpu | |
parent | 33ca0e1b9dfb47c6f9836c7fc19d04bd34337767 (diff) |
Add GCC7 -Wimplicit-fallthrough support/fixes.
GCC7 will have a new -Wimplicit-fallthrough warning. It did catch one
small buglet in elflint option procession. So it seems useful to enable
to make sure all swatch case fallthroughs are deliberate.
Add configure check to detect whether gcc support -Wimplicit-fallthrough
and enable it. Add fixes and explicit fallthrough comments where necessary.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'libcpu')
-rw-r--r-- | libcpu/ChangeLog | 6 | ||||
-rw-r--r-- | libcpu/i386_disasm.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog index fff1d96a..79110c22 100644 --- a/libcpu/ChangeLog +++ b/libcpu/ChangeLog @@ -1,4 +1,8 @@ -2015-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> +2016-11-02 Mark Wielaard <mjw@redhat.com> + + * i386_disasm.c (i386_disasm): Add fallthrough comment. + +2016-10-11 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp> * i386_lex.l: Remove system.h include, add libeu.h include. * i386_parse.y: Remove sys/param.h include, add libeu.h include. diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c index 699dd619..831afbe2 100644 --- a/libcpu/i386_disasm.c +++ b/libcpu/i386_disasm.c @@ -819,7 +819,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)), ++param_start; break; } - + /* Fallthrough */ default: assert (! "INVALID not handled"); } |