From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by sourceware.org (Postfix) with ESMTPS id 917DF385BF9F for ; Sun, 22 Mar 2020 12:55:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 917DF385BF9F Received: by mail-pg1-x52c.google.com with SMTP id 142so459993pgf.11 for ; Sun, 22 Mar 2020 05:55:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=BXZdMV7vkqnQPViDLEeYuw24G26hm1+4pBz4PtfxsUA=; b=luliWHSBw2A3n2YRpgb2Shdm4NqdnBITNdTCaHhKipjhNhZYL0wmGt8boPSfQfJLEf Fydk+PDE56KYAEqomA/cyu5rnu5IvvkWb2cfumcjuAn4dHSlenkyaupzrU9BUi8smlEv /mVTyDvHHI3Fdlu+Z5SZIJbu1/CSiF+ZlzFUgVTwQA01wD2f9OSTTXOvm3SwVjXrHGGh RRrG/uScgEdMaQoyyGG0MTqxAl+d5sZcBgX/2hlBs5WEYJngXafBg5yVcwl8wzqySjvk yJCrgJ4USGe+WjKQUjo9+Z4IFN5aqchQy6XB4IWxW8pJaDfQSJY7lCri6hVNvQjx7+zF UQWg== X-Gm-Message-State: ANhLgQ0fTnh7OGeGwpi2girZLRxLU+YPIywSCqKIKzg1l0tEpK6DGKBM F6v1noEFOHi/rBVCzl9QqPbc5GMI20o= X-Google-Smtp-Source: ADFU+vuL6FlEYBN9nhSZtB+HF5dvo+4aSYZiFAb/wnpyXRz8915/5G55naq7ObN1YVAwK0n47HjBig== X-Received: by 2002:a62:1d1:: with SMTP id 200mr20371282pfb.8.1584881699536; Sun, 22 Mar 2020 05:54:59 -0700 (PDT) Received: from bubble.grove.modra.org ([2406:3400:51d:8cc0:6120:5ee0:cb93:ed00]) by smtp.gmail.com with ESMTPSA id c126sm10597855pfb.83.2020.03.22.05.54.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Mar 2020 05:54:59 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 79B0188E40; Sun, 22 Mar 2020 23:24:55 +1030 (ACDT) Date: Sun, 22 Mar 2020 23:24:55 +1030 From: Alan Modra To: binutils@sourceware.org Subject: ARC: Use of uninitialised value Message-ID: <20200322125455.GP4583@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-Spam-Status: No, score=-26.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 12:55:01 -0000 * 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