From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4492 invoked by alias); 5 May 2010 20:51:35 -0000 Received: (qmail 4478 invoked by uid 22791); 5 May 2010 20:51:34 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 May 2010 20:51:23 +0000 Received: (qmail 7916 invoked from network); 5 May 2010 20:51:21 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 5 May 2010 20:51:21 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [ob] remote.c, eliminate unused variables Date: Wed, 05 May 2010 20:51:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-20-generic; KDE/4.3.2; x86_64; ; ) Cc: Michael Snyder References: <4BE1D93F.8000309@vmware.com> In-Reply-To: <4BE1D93F.8000309@vmware.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201005052151.19745.pedro@codesourcery.com> 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/msg00125.txt.bz2 On Wednesday 05 May 2010 21:46:55, Michael Snyder wrote: > 2010-05-05 Michael Snyder > > * remote.c (remote_threads_info): Delete unused variable. > (process_stop_reply): Delete unused variable. > (remote_get_trace_status): Delete unused variables. > > Index: remote.c > =================================================================== > RCS file: /cvs/src/src/gdb/remote.c,v > retrieving revision 1.405 > diff -u -p -r1.405 remote.c > --- 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? In this case, creating a null_cleanup and not storing a pointer anywhere is highly suspicious... -- Pedro Alves