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]

[ob] linux-fork.c, linux-thread-db.c, eliminate unused variables


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

	* linux-thread-db.c (add_thread_db_info): Delete unused variable.
	(thread_from_lwp): Delete unused variable.
	(enable_thread_event_reporting): Delete unused variable.
	(check_for_thread_db): Delete unused variables.
	(thread_db_find_new_threads_2): Delete unused variable.
	
	* linux-fork.c (info_checkpoints_command): Delete unused variables.
	(checkpoint_command): Delete unused variable.
	(linux_fork_context): Delete unused variables.

Index: linux-thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-thread-db.c,v
retrieving revision 1.72
diff -u -p -r1.72 linux-thread-db.c
--- linux-thread-db.c	12 Jan 2010 21:40:24 -0000	1.72
+++ linux-thread-db.c	5 May 2010 20:31:01 -0000
@@ -172,7 +172,6 @@ static void thread_db_find_new_threads_2
 static struct thread_db_info *
 add_thread_db_info (void *handle)
 {
-  int pid;
   struct thread_db_info *info;
 
   info = xcalloc (1, sizeof (*info));
@@ -402,7 +401,6 @@ thread_from_lwp (ptid_t ptid)
 {
   td_thrhandle_t th;
   td_err_e err;
-  ptid_t thread_ptid;
   struct thread_db_info *info;
   struct thread_get_info_inout io = {0};
 
@@ -527,7 +525,6 @@ static void
 enable_thread_event_reporting (void)
 {
   td_thr_events_t events;
-  td_notify_t notify;
   td_err_e err;
 #ifdef HAVE_GNU_LIBC_VERSION_H
   const char *libc_version;
@@ -959,9 +956,6 @@ check_thread_signals (void)
 void
 check_for_thread_db (void)
 {
-  td_err_e err;
-  static void *last_loaded;
-
   /* Do nothing if we couldn't load libthread_db.so.1.  */
   if (!thread_db_load ())
     return;
@@ -1440,8 +1434,6 @@ thread_db_find_new_threads_2 (ptid_t pti
     }
   else
     {
-      td_err_e err;
-
       find_new_threads_once (info, 0, &err);
       if (err != TD_OK)
 	error (_("Cannot find new threads: %s"), thread_db_err_str (err));
Index: linux-fork.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-fork.c,v
retrieving revision 1.31
diff -u -p -r1.31 linux-fork.c
--- linux-fork.c	1 Jan 2010 07:31:36 -0000	1.31
+++ linux-fork.c	5 May 2010 20:31:01 -0000
@@ -468,11 +468,8 @@ static void
 info_checkpoints_command (char *arg, int from_tty)
 {
   struct gdbarch *gdbarch = get_current_arch ();
-  struct frame_info *cur_frame;
   struct symtab_and_line sal;
-  struct symtab *cur_symtab;
   struct fork_info *fp;
-  int cur_line;
   ULONGEST pc;
   int requested = -1;
   struct fork_info *printed = NULL;
@@ -554,7 +551,6 @@ checkpoint_command (char *args, int from
   struct fork_info *fp;
   pid_t retpid;
   struct cleanup *old_chain;
-  long i;
 
   /* Make the inferior fork, record its (and gdb's) state.  */
 
@@ -607,8 +603,6 @@ linux_fork_context (struct fork_info *ne
 {
   /* Now we attempt to switch processes.  */
   struct fork_info *oldfp;
-  ptid_t ptid;
-  int id, i;
 
   gdb_assert (newfp != NULL);
 

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