This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [ob] remote.c, eliminate unused variables
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Michael Snyder <msnyder at vmware dot com>
- Date: Wed, 5 May 2010 21:51:19 +0100
- Subject: Re: [ob] remote.c, eliminate unused variables
- References: <4BE1D93F.8000309@vmware.com>
On Wednesday 05 May 2010 21:46:55, Michael Snyder wrote:
> 2010-05-05 Michael Snyder <msnyder@vmware.com>
>
> * 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