From patchwork Sat Jul 14 21:55:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 28398 Received: (qmail 94683 invoked by alias); 14 Jul 2018 21:56:01 -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 94669 invoked by uid 89); 14 Jul 2018 21:56:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=allocates, sideeffects, side-effects X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 14 Jul 2018 21:55:59 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 51B931E093; Sat, 14 Jul 2018 17:55:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=simark.ca; s=mail; t=1531605358; bh=mlMSQBDe00ZQ1ef4SVCmXx+iq29tIrwD2R+k3b8mts0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=K89yNdE+D8DnYbHCekwt8nCDkHIygcZ2EnF9sUOyXQmeWf0Rdcv1+4Jh1qjP6FJ6g C956Qjj81e71hSa13Nb+If9h4zdmbHvepZj87Hg9WaSZjWLsLv8YzRc7VT+Y5nEH3x QrKWWwq7eLMtOiGawoVovnK59wvj5zbxJuhps944= Subject: Re: [RFA 01/13] Simple unused variable removals To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20180712205208.32646-1-tom@tromey.com> <20180712205208.32646-2-tom@tromey.com> <87b519fc-318a-84aa-7ced-aea354f059fb@simark.ca> <87in5i9ej4.fsf@tromey.com> From: Simon Marchi Message-ID: Date: Sat, 14 Jul 2018 17:55:57 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <87in5i9ej4.fsf@tromey.com> On 2018-07-14 08:40 AM, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> - CORE_ADDR size = extract_unsigned_integer (ovly_table + 16*i + 4, > Simon> - 4, byte_order); > > Simon> I wondered this was a bug (should that variable really be used), but I > Simon> wouldn't know without some quite extensive research... so all-in-all, LGTM. > > Yes, this one was on the bubble and I almost put it in its own patch... > I can't recall offhand if there were others like this. > > Tom > And here's another one that I think is less obvious. The call has side-effects (it allocates the per-inferior data), but I don't think it's really needed. From 4014eefe405a66c6e2ade325e14ed891e9f0f62a Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 13 Jul 2018 23:09:04 -0400 Subject: [PATCH] semi-obvious --- gdb/remote-sim.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index cc7a6f27fc99..d30b38ecb7ce 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -831,9 +831,6 @@ gdbsim_close_inferior (struct inferior *inf, void *arg) void gdbsim_target::close () { - struct sim_inferior_data *sim_data - = get_sim_inferior_data (current_inferior (), SIM_INSTANCE_NOT_NEEDED); - if (remote_debug) fprintf_unfiltered (gdb_stdlog, "gdbsim_close\n"); @@ -1184,9 +1181,6 @@ gdbsim_target::files_info () void gdbsim_target::mourn_inferior () { - struct sim_inferior_data *sim_data - = get_sim_inferior_data (current_inferior (), SIM_INSTANCE_NOT_NEEDED); - if (remote_debug) fprintf_unfiltered (gdb_stdlog, "gdbsim_mourn_inferior:\n");