mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-18 05:12:33 +08:00
Fix "obvious" fall-through warnings
This patch fixes the subset of -Wimplicit-fallthrough warnings that I considered obvious. In most cases it was obvious from context that falling through was desired; here I added the appropriate comment. In a couple of cases it seemed clear that a "break" was missing. ChangeLog 2018-05-04 Tom Tromey <tom@tromey.com> * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment. * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment. * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through comment. * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through comment. * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through comment.
This commit is contained in:
@ -1,3 +1,14 @@
|
|||||||
|
2018-05-04 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
|
||||||
|
* utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
|
||||||
|
* eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
|
||||||
|
comment.
|
||||||
|
* d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
|
||||||
|
comment.
|
||||||
|
* coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
|
||||||
|
comment.
|
||||||
|
|
||||||
2018-05-04 Tom Tromey <tom@tromey.com>
|
2018-05-04 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
|
* dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
|
||||||
|
@ -928,6 +928,7 @@ coff_symtab_read (minimal_symbol_reader &reader,
|
|||||||
backtraces, so filter them out (from phdm@macqel.be). */
|
backtraces, so filter them out (from phdm@macqel.be). */
|
||||||
if (within_function)
|
if (within_function)
|
||||||
break;
|
break;
|
||||||
|
/* Fall through. */
|
||||||
case C_STAT:
|
case C_STAT:
|
||||||
case C_THUMBLABEL:
|
case C_THUMBLABEL:
|
||||||
case C_THUMBSTAT:
|
case C_THUMBSTAT:
|
||||||
|
@ -88,6 +88,7 @@ d_val_print (struct type *type, int embedded_offset,
|
|||||||
stream, recurse, val, options);
|
stream, recurse, val, options);
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
break;
|
break;
|
||||||
|
/* Fall through. */
|
||||||
default:
|
default:
|
||||||
c_val_print (type, embedded_offset, address, stream,
|
c_val_print (type, embedded_offset, address, stream,
|
||||||
recurse, val, options);
|
recurse, val, options);
|
||||||
|
@ -215,6 +215,7 @@ fetch_subexp_value (struct expression *exp, int *pc, struct value **valp,
|
|||||||
case MEMORY_ERROR:
|
case MEMORY_ERROR:
|
||||||
if (!preserve_errors)
|
if (!preserve_errors)
|
||||||
break;
|
break;
|
||||||
|
/* Fall through. */
|
||||||
default:
|
default:
|
||||||
throw_exception (ex);
|
throw_exception (ex);
|
||||||
break;
|
break;
|
||||||
|
@ -369,6 +369,7 @@ riscv_isa_xlen (struct gdbarch *gdbarch)
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
warning (_("unknown xlen size, assuming 4 bytes"));
|
warning (_("unknown xlen size, assuming 4 bytes"));
|
||||||
|
/* Fall through. */
|
||||||
case 1:
|
case 1:
|
||||||
return 4;
|
return 4;
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -275,6 +275,7 @@ can_dump_core (enum resource_limit_kind limit_kind)
|
|||||||
case LIMIT_CUR:
|
case LIMIT_CUR:
|
||||||
if (rlim.rlim_cur == 0)
|
if (rlim.rlim_cur == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
/* Fall through. */
|
||||||
|
|
||||||
case LIMIT_MAX:
|
case LIMIT_MAX:
|
||||||
if (rlim.rlim_max == 0)
|
if (rlim.rlim_max == 0)
|
||||||
|
Reference in New Issue
Block a user