public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: ARC: Use of uninitialised value
Date: Sun, 22 Mar 2020 23:24:55 +1030	[thread overview]
Message-ID: <20200322125455.GP4583@bubble.grove.modra.org> (raw)

	* arc-dis.c (find_format): Use ISO C string concatenation rather
	than line continuation within a string.  Don't access needs_limm
	before testing opcode != NULL.

diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c
index 9662c2fc53..131aee6b34 100644
--- a/opcodes/arc-dis.c
+++ b/opcodes/arc-dis.c
@@ -436,8 +436,9 @@ find_format (bfd_vma                       memaddr,
 	  opcode = arcExtMap_genOpcode (i, isa_mask, &errmsg);
 	  if (opcode == NULL)
 	    {
-	      (*info->fprintf_func) (info->stream, "\
-An error occured while generating the extension instruction operations");
+	      (*info->fprintf_func) (info->stream,
+				     _("An error occured while generating the "
+				       "extension instruction operations"));
 	      *opcode_result = NULL;
 	      return FALSE;
 	    }
@@ -452,7 +453,7 @@ An error occured while generating the extension instruction operations");
     opcode = find_format_from_table (info, arc_opcodes, insn, *insn_len,
 				     isa_mask, &needs_limm, TRUE);
 
-  if (needs_limm && opcode != NULL)
+  if (opcode != NULL && needs_limm)
     {
       bfd_byte buffer[4];
       int status;

-- 
Alan Modra
Australia Development Lab, IBM

             reply	other threads:[~2020-03-22 12:55 UTC|newest]

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

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=20200322125455.GP4583@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).