aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-m68k.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-09-22 18:09:49 +0930
committerAlan Modra <amodra@gmail.com>2014-09-22 19:01:25 +0930
commit28a0da39c6db871d66b945d3025f69d56e487aa9 (patch)
treec753121ed2616c7940ca37d441c4f1e83a4c0854 /gas/config/tc-m68k.c
parent49727e46175419c638251b39091f24c575568bee (diff)
downloadgdb-28a0da39c6db871d66b945d3025f69d56e487aa9.zip
gdb-28a0da39c6db871d66b945d3025f69d56e487aa9.tar.gz
gdb-28a0da39c6db871d66b945d3025f69d56e487aa9.tar.bz2
Fix various warnings seen when using gcc-5.0
* config/tc-m68k.c (md_assemble): Add assert to work around bogus trunk gcc warning. * config/tc-pj.h (md_convert_frag): Warning fix. * config/tc-xtensa.c (xg_assemble_vliw_tokens): Warning fix.
Diffstat (limited to 'gas/config/tc-m68k.c')
-rw-r--r--gas/config/tc-m68k.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index 56db083..7fc4efe 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -4511,7 +4511,8 @@ md_assemble (char *str)
(relax_substateT) (the_ins.fragb[n].fragty),
the_ins.fragb[n].fadd, the_ins.fragb[n].foff, to_beg_P);
}
- n = (the_ins.numo - the_ins.fragb[n - 1].fragoff);
+ gas_assert (the_ins.nfrag >= 1);
+ n = the_ins.numo - the_ins.fragb[the_ins.nfrag - 1].fragoff;
shorts_this_frag = 0;
if (n)
{