public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: Re: ARC: Use of uninitialised value
Date: Thu, 26 Mar 2020 20:03:58 +1030	[thread overview]
Message-ID: <20200326093358.GJ4583@bubble.grove.modra.org> (raw)
In-Reply-To: <20200322125455.GP4583@bubble.grove.modra.org>

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.

diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c
index 131aee6b34..dc9e490ce8 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;

-- 
Alan Modra
Australia Development Lab, IBM

      reply	other threads:[~2020-03-26  9:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-22 12:54 Alan Modra
2020-03-26  9:33 ` Alan Modra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200326093358.GJ4583@bubble.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).