From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15445 invoked by alias); 5 May 2010 22:22:26 -0000 Received: (qmail 15436 invoked by uid 22791); 5 May 2010 22:22:26 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 May 2010 22:22:22 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 4819825006; Wed, 5 May 2010 15:22:21 -0700 (PDT) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost3.vmware.com (Postfix) with ESMTP id 3C8D4CD91F; Wed, 5 May 2010 15:22:21 -0700 (PDT) Message-ID: <4BE1EF9C.8070807@vmware.com> Date: Wed, 05 May 2010 22:22:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Pedro Alves CC: "gdb-patches@sourceware.org" Subject: Re: [ob] remote.c, eliminate unused variables References: <4BE1D93F.8000309@vmware.com> <201005052151.19745.pedro@codesourcery.com> <4BE1DFA9.9060607@vmware.com> <201005052241.14753.pedro@codesourcery.com> In-Reply-To: <201005052241.14753.pedro@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00134.txt.bz2 Pedro Alves wrote: > On Wednesday 05 May 2010 22:14:17, Michael Snyder wrote: >> Pedro Alves wrote: >>> On Wednesday 05 May 2010 21:46:55, Michael Snyder wrote: > >>>> --- remote.c 5 May 2010 15:05:57 -0000 1.405 >>>> +++ remote.c 5 May 2010 20:43:46 -0000 >>>> @@ -2512,8 +2512,8 @@ remote_threads_info (struct target_ops * >>>> { >>>> struct gdb_xml_parser *parser; >>>> struct threads_parsing_context context; >>>> - struct cleanup *back_to = make_cleanup (null_cleanup, NULL); >>>> >>>> + make_cleanup (null_cleanup, NULL); >>> Are you making sure (in all your patches) that the reason the >>> variables are unused isn't itself a bug? >> Can't guarantee it, no. >> I'm making sure the semantics isn't changed, but I can't always >> be sure that the original semantics was right. > > Well, then I'll ask please, don't "fix" more things like this, > and surely don't call it obvious. You're removing a warning for > the sake of it. No, I'm attempting to make the code easier to understand by removing dead code and variables. Since this warning is turned off, I'm not even reducing the number of warnings. > A warning is useful as a hint at something > wrong with the code; there may be something genuinely wrong > with it. Removing it blindly removes the useful hint. There's no hint if the warning is turned off. If I hadn't touched it and you hadn't reviewed my change, it would have remained undiscovered indefinitely. So let's fix it, shall we? I'll post a separate patch for you to review. > If you > want to be bothered to look at the code to see if there's > something else genuinely wrong, then please, don't change it. That's not fair, I did "bother" to look at the code. One got by me, that's all. Thanks for catching it.