]> git.ipfire.org Git - thirdparty/elfutils.git/commit
Use fallthrough attribute.
authorJoshua Watt <jpewhacker@gmail.com>
Fri, 9 Feb 2018 16:27:18 +0000 (10:27 -0600)
committerMark Wielaard <mark@klomp.org>
Sat, 10 Feb 2018 02:19:26 +0000 (03:19 +0100)
commit555e15ebe8bf1eb33d00747173cfc80cc65648a4
tree6aa9cca6e04514cbc45d88f96a873cc6a4767472
parent240a068fcf3eb6bbcda525f80c8778de62621d9e
Use fallthrough attribute.

Use __attribute__ ((fallthrough)) to indicate switch case fall through
instead of a comment. This ensures that the fallthrough warning is not
triggered even if the file is pre-processed (hence stripping the
comments) before it is compiled.

The actual fallback implementation is hidden behind a FALLBACK macro in
case the compiler doesn't support it.

Finally, the -Wimplict-fallthrough warning was upgraded to only allow
the attribute to satisfy it; a comment alone is no longer sufficient.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
49 files changed:
ChangeLog
backends/ChangeLog
backends/aarch64_retval.c
backends/alpha_retval.c
backends/arm_regs.c
backends/arm_retval.c
backends/i386_regs.c
backends/i386_retval.c
backends/ia64_retval.c
backends/linux-core-note.c
backends/m68k_retval.c
backends/ppc64_retval.c
backends/ppc_regs.c
backends/ppc_retval.c
backends/s390_retval.c
backends/sh_retval.c
backends/sparc_retval.c
backends/tilegx_retval.c
backends/x86_64_regs.c
backends/x86_64_retval.c
config/ChangeLog
config/eu.am
configure.ac
lib/ChangeLog
lib/eu-config.h
libcpu/ChangeLog
libcpu/i386_disasm.c
libdw/ChangeLog
libdw/cfi.c
libdw/dwarf_frame_register.c
libdwfl/ChangeLog
libdwfl/dwfl_report_elf.c
libdwfl/frame_unwind.c
libebl/ChangeLog
libebl/eblobjnote.c
libelf/ChangeLog
libelf/elf32_updatenull.c
libelf/elf_begin.c
libelf/elf_cntl.c
src/ChangeLog
src/addr2line.c
src/elfcompress.c
src/elflint.c
src/objdump.c
src/readelf.c
src/strings.c
tests/ChangeLog
tests/backtrace.c
tests/elfstrmerge.c