aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-10-05 16:52:24 +1030
committerAlan Modra <amodra@gmail.com>2016-10-06 09:39:56 +1030
commit2b804145796e948fa4c025c07eb201e700281e6b (patch)
treec1a7b298379035822fa1d77ebe2a9a82d71fdca4 /gas
parentd8e9025191bc7b8ac1ffe28612a9015cd238f5b2 (diff)
downloadfsf-binutils-gdb-2b804145796e948fa4c025c07eb201e700281e6b.zip
fsf-binutils-gdb-2b804145796e948fa4c025c07eb201e700281e6b.tar.gz
fsf-binutils-gdb-2b804145796e948fa4c025c07eb201e700281e6b.tar.bz2
-Wimplicit-fallthrough error fixes
Well, not all are errors, but a little more substantive than just fiddling with comments. bfd/ * coffcode.h (coff_slurp_symbol_table): Revert accidental commit made 2015-01-08. * elf32-nds32.c (nds32_elf_grok_psinfo): Add missing break. * reloc.c (bfd_default_reloc_type_lookup): Add missing breaks. opcodes/ * arc-ext.c (create_map): Add missing break. * msp430-decode.opc (encode_as): Likewise. * msp430-decode.c: Regenerate. binutils/ * coffdump.c (dump_coff_where): Add missing break. * stabs.c (stab_xcoff_builtin_type): Likewise. gas/ * config/tc-arc.c (find_opcode_match): Add missing break. * config/tc-i960.c (get_cdisp): Likewise. * config/tc-metag.c (parse_swap, md_apply_fix): Likewise. * config/tc-mt.c (md_parse_option): Likewise. * config/tc-nds32.c (nds32_apply_fix): Likewise. * config/tc-hppa.c (pa_ip): Assert rather than testing last condition of multiple if statements. * config/tc-s390.c (s390_exp_compare): Return 0 on error. * config/tc-tic4x.c (tic4x_operand_parse): Add as_bad and break out of case rather than falling into next case. Formatting. ld/ * plugin.c (asymbol_from_plugin_symbol): Avoid compiler warning by adding return.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog13
-rw-r--r--gas/config/tc-arc.c1
-rw-r--r--gas/config/tc-hppa.c3
-rw-r--r--gas/config/tc-i960.c1
-rw-r--r--gas/config/tc-metag.c2
-rw-r--r--gas/config/tc-mt.c1
-rw-r--r--gas/config/tc-nds32.c1
-rw-r--r--gas/config/tc-s390.c1
-rw-r--r--gas/config/tc-tic4x.c15
9 files changed, 28 insertions, 10 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 22a948d..80ab144 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,18 @@
2016-10-06 Alan Modra <amodra@gmail.com>
+ * config/tc-arc.c (find_opcode_match): Add missing break.
+ * config/tc-i960.c (get_cdisp): Likewise.
+ * config/tc-metag.c (parse_swap, md_apply_fix): Likewise.
+ * config/tc-mt.c (md_parse_option): Likewise.
+ * config/tc-nds32.c (nds32_apply_fix): Likewise.
+ * config/tc-hppa.c (pa_ip): Assert rather than testing last
+ condition of multiple if statements.
+ * config/tc-s390.c (s390_exp_compare): Return 0 on error.
+ * config/tc-tic4x.c (tic4x_operand_parse): Add as_bad and break
+ out of case rather than falling into next case. Formatting.
+
+2016-10-06 Alan Modra <amodra@gmail.com>
+
* config/rl78-parse.y: Don't use deprecated %name-prefix.
* config/rx-parse.y: Likewise.
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index 58adf0b..d480bf1 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -1929,6 +1929,7 @@ find_opcode_match (const struct arc_opcode_hash_entry *entry,
case O_absent:
if (!generic_reloc_p (operand->default_reloc))
goto match_failed;
+ break;
default:
break;
}
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index aea78dc..f5cdc2c 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -3505,8 +3505,9 @@ pa_ip (char *str)
/* M bit is explicit in the major opcode. */
INSERT_FIELD_AND_CONTINUE (opcode, a, 2);
}
- else if (*args == 'e')
+ else
{
+ gas_assert (*args == 'e');
/* Stash the ma/mb flag temporarily in the
instruction. We will use (and remove it)
later when handling 'J', 'K', '<' & '>'. */
diff --git a/gas/config/tc-i960.c b/gas/config/tc-i960.c
index 59ef760..5afbb6f 100644
--- a/gas/config/tc-i960.c
+++ b/gas/config/tc-i960.c
@@ -577,6 +577,7 @@ get_cdisp (const char *dispP, /* Displacement as specified in source instruction
{
case O_illegal:
as_bad (_("expression syntax error"));
+ break;
case O_symbol:
if (S_GET_SEGMENT (e.X_add_symbol) == now_seg
diff --git a/gas/config/tc-metag.c b/gas/config/tc-metag.c
index bbc34f7..e9f8687 100644
--- a/gas/config/tc-metag.c
+++ b/gas/config/tc-metag.c
@@ -2040,6 +2040,7 @@ parse_swap (const char *line, metag_insn *insn,
as_bad (_("PC, CT, TR and TT are treated as if they are a single unit but operands must be in different units"));
return NULL;
}
+ break;
default:
/* Registers must be in different units. */
@@ -7109,6 +7110,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
break;
case BFD_RELOC_64:
md_number_to_chars (buf, value, 8);
+ break;
case BFD_RELOC_METAG_RELBRANCH:
if (!value)
diff --git a/gas/config/tc-mt.c b/gas/config/tc-mt.c
index bbcd87e..1ae271e 100644
--- a/gas/config/tc-mt.c
+++ b/gas/config/tc-mt.c
@@ -133,6 +133,7 @@ md_parse_option (int c ATTRIBUTE_UNUSED, const char * arg)
mt_mach_bitmask = 1 << MACH_MS2;
mt_arch = ms2;
}
+ break;
case OPTION_NO_SCHED_REST:
no_scheduling_restrictions = 1;
break;
diff --git a/gas/config/tc-nds32.c b/gas/config/tc-nds32.c
index f8a9277..de59f46 100644
--- a/gas/config/tc-nds32.c
+++ b/gas/config/tc-nds32.c
@@ -6605,6 +6605,7 @@ nds32_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
break;
case BFD_RELOC_64:
md_number_to_chars (where, value, 8);
+ break;
default:
as_bad_where (fixP->fx_file, fixP->fx_line,
_("Internal error: Unknown fixup type %d (`%s')"),
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 356bbb0..bc318ee 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -929,6 +929,7 @@ s390_exp_compare (expressionS *exp1, expressionS *exp2)
case O_big:
as_bad (_("Can't handle O_big in s390_exp_compare"));
+ return 0;
case O_symbol: /* X_add_symbol & X_add_number must be equal. */
case O_symbol_rva:
diff --git a/gas/config/tc-tic4x.c b/gas/config/tc-tic4x.c
index 407fe17..84c9ece 100644
--- a/gas/config/tc-tic4x.c
+++ b/gas/config/tc-tic4x.c
@@ -1553,10 +1553,10 @@ tic4x_operand_parse (char *s, tic4x_operand_t *operand)
/* Allow ori ^foo, ar0 to be equivalent to ldi .hi.foo, ar0 */
/* WARNING : The TI C40 assembler cannot do this. */
else if (exp->X_op == O_symbol)
- {
- operand->mode = M_HI;
- break;
- }
+ operand->mode = M_HI;
+ else
+ as_bad (_("Expecting a constant value"));
+ break;
case '#':
input_line_pointer = tic4x_expression (++input_line_pointer, exp);
@@ -1576,14 +1576,11 @@ tic4x_operand_parse (char *s, tic4x_operand_t *operand)
/* Allow ori foo, ar0 to be equivalent to ldi .lo.foo, ar0 */
/* WARNING : The TI C40 assembler cannot do this. */
else if (exp->X_op == O_symbol)
- {
- operand->mode = M_IMMED;
- break;
- }
-
+ operand->mode = M_IMMED;
else
as_bad (_("Expecting a constant value"));
break;
+
case '\\':
#endif
case '@':