From patchwork Mon Mar 11 16:23:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 31816 Received: (qmail 82643 invoked by alias); 11 Mar 2019 16:23:58 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 82623 invoked by uid 89); 11 Mar 2019 16:23:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1094, assignments, HContent-Transfer-Encoding:8bit X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Mar 2019 16:23:56 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 01DF9560FF; Mon, 11 Mar 2019 12:23:55 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DdWR0UDxRvyV; Mon, 11 Mar 2019 12:23:54 -0400 (EDT) Received: from murgatroyd.Home (75-166-85-218.hlrn.qwest.net [75.166.85.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id A328856079; Mon, 11 Mar 2019 12:23:54 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI] Remove redundant assignment from dwarf2_find_containing_comp_unit Date: Mon, 11 Mar 2019 10:23:52 -0600 Message-Id: <20190311162352.17397-1-tromey@adacore.com> MIME-Version: 1.0 dwarf2_find_containing_comp_unit has two assignments to "this_cu" in quick succession, both of which are just: this_cu = dwarf2_per_objfile->all_comp_units[low]; ... with no intervening assignments. This patch removes the second assignment. I'm checking this in as obvious. Tested on x86-64 Fedora 29. gdb/ChangeLog 2019-03-11 Tom Tromey * dwarf2read.c (dwarf2_find_containing_comp_unit): Remove redundant assignment to "this_cu". --- gdb/ChangeLog | 5 +++++ gdb/dwarf2read.c | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 0c59dcd2042..7c07a10e8c0 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -25157,7 +25157,6 @@ dwarf2_find_containing_comp_unit (sect_offset sect_off, } else { - this_cu = dwarf2_per_objfile->all_comp_units[low]; if (low == dwarf2_per_objfile->all_comp_units.size () - 1 && sect_off >= this_cu->sect_off + this_cu->length) error (_("invalid dwarf2 offset %s"), sect_offset_str (sect_off));