From 4c4addbe57711f1cdbb72305b8cbd03a68ae2e34 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 26 Mar 2020 16:20:47 +1030 Subject: [PATCH] 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. --- opcodes/ChangeLog | 4 ++++ opcodes/arc-dis.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index bdfccbac78c..a88a762c3a4 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2020-03-26 Alan Modra + + * arc-dis.c (find_format): Init needs_limm. Simplify use of limm. + 2020-03-25 Alan Modra * z80-dis.c (suffix): Init mybuf. diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c index 131aee6b34e..dc9e490ce8a 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; -- 2.30.2