diff options
author | Alan Modra <amodra@gmail.com> | 2020-03-26 16:20:47 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-03-26 20:02:42 +1030 |
commit | 4c4addbe57711f1cdbb72305b8cbd03a68ae2e34 (patch) | |
tree | 10dc455bdd408a58f45c9d5c853af27e47d4d799 /opcodes | |
parent | f75fbe8ad2e3d9b34bf1f448a6df328ff361822f (diff) | |
download | gdb-4c4addbe57711f1cdbb72305b8cbd03a68ae2e34.zip gdb-4c4addbe57711f1cdbb72305b8cbd03a68ae2e34.tar.gz gdb-4c4addbe57711f1cdbb72305b8cbd03a68ae2e34.tar.bz2 |
Re: ARC: Use of uninitialised value
git commit beea5cc1bc fixed one use of an uninitialised value but
ignored another one a few lines later.
* arc-dis.c (find_format): Init needs_limm. Simplify use of limm.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 4 | ||||
-rw-r--r-- | opcodes/arc-dis.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index bdfccba..a88a762 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2020-03-26 Alan Modra <amodra@gmail.com> + + * arc-dis.c (find_format): Init needs_limm. Simplify use of limm. + 2020-03-25 Alan Modra <amodra@gmail.com> * z80-dis.c (suffix): Init mybuf. diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c index 131aee6..dc9e490 100644 --- a/opcodes/arc-dis.c +++ b/opcodes/arc-dis.c @@ -420,7 +420,7 @@ find_format (bfd_vma memaddr, struct arc_operand_iterator * iter) { const struct arc_opcode *opcode = NULL; - bfd_boolean needs_limm; + bfd_boolean needs_limm = FALSE; const extInstruction_t *einsn, *i; unsigned limm = 0; struct arc_disassemble_info *arc_infop = info->private_data; @@ -483,7 +483,7 @@ find_format (bfd_vma memaddr, /* Update private data. */ arc_infop->opcode = opcode; - arc_infop->limm = (needs_limm) ? limm : 0; + arc_infop->limm = limm; arc_infop->limm_p = needs_limm; return TRUE; |