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.
This commit is contained in:
Alan Modra 2020-03-26 16:20:47 +10:30
parent f75fbe8ad2
commit 4c4addbe57
2 changed files with 6 additions and 2 deletions

View File

@ -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.

View File

@ -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;