This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] remote.c, clean-up mix-up


I'm not sure if this clean-up ever happens, because the declaration
merely shadows an outer declaration of the same name, and the do_cleanups call happens outside the scope of this declaration.


This is my **GUESS** as to what might be intended here.
If anybody has an alternate hypothesis, it's probably
better than mine.

2010-05-05  Michael Snyder  <msnyder@vmware.com>

	* remote.c (remote_threads_info): Remove shadowing declaration.

Index: remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.407
diff -u -p -5 -r1.407 remote.c
--- remote.c	5 May 2010 22:27:15 -0000	1.407
+++ remote.c	5 May 2010 22:31:28 -0000
@@ -2510,12 +2510,12 @@ remote_threads_info (struct target_ops *
       struct cleanup *back_to = make_cleanup (xfree, xml);
       if (xml && *xml)
 	{
 	  struct gdb_xml_parser *parser;
 	  struct threads_parsing_context context;
-	  struct cleanup back_to = make_cleanup (null_cleanup, NULL);
 
+	  back_to = make_cleanup (null_cleanup, NULL);
 	  context.items = 0;
 	  parser = gdb_xml_create_parser_and_cleanup (_("threads"),
 						      threads_elements,
 						      &context);
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]