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]

[patch] linespec, dictionary, infcall, infcmd, infrun, stack.c: delete unused variables


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

	* linespec.c (decode_compound): Delete unused variable.
	* dictionary.c (iterator_next_hashed): Delete unused variable.
	* infcall.c (call_function_by_hand): Delete unused variable.
	* infcmd.c (step_1): Delete unused variable.
	(registers_info): Delete unused variable.
	(attach_command): Delete unused variable.
	* infrun.c (follow_exec): Delete unused variable.
	(handle_step_into_function_backwards): Delete unused variable.
	(_initialize_infrun): Delete unused variable.
	* stack.c (parse_frame_specification_1): Delete unused variable.
	(frame_info): Delete unused variable.
	(backtrace_command_1): Delete unused variable.
	(catch_info): Delete unused variable.

Index: linespec.c
===================================================================
RCS file: /cvs/src/src/gdb/linespec.c,v
retrieving revision 1.101
diff -u -p -r1.101 linespec.c
--- linespec.c	2 May 2010 23:52:14 -0000	1.101
+++ linespec.c	6 May 2010 19:13:21 -0000
@@ -1209,7 +1209,6 @@ decode_compound (char **argptr, int funf
   struct symbol *sym;
   char *copy;
   struct symbol *sym_class;
-  struct symbol **sym_arr;
   struct type *t;
   char *saved_java_argptr = NULL;
 
Index: dictionary.c
===================================================================
RCS file: /cvs/src/src/gdb/dictionary.c,v
retrieving revision 1.12
diff -u -p -r1.12 dictionary.c
--- dictionary.c	1 Jan 2010 07:31:30 -0000	1.12
+++ dictionary.c	6 May 2010 19:13:21 -0000
@@ -578,7 +578,6 @@ iterator_first_hashed (const struct dict
 static struct symbol *
 iterator_next_hashed (struct dict_iterator *iterator)
 {
-  const struct dictionary *dict = DICT_ITERATOR_DICT (iterator);
   struct symbol *next;
 
   next = DICT_ITERATOR_CURRENT (iterator)->hash_next;
Index: infcall.c
===================================================================
RCS file: /cvs/src/src/gdb/infcall.c,v
retrieving revision 1.129
diff -u -p -r1.129 infcall.c
--- infcall.c	25 Mar 2010 20:48:53 -0000	1.129
+++ infcall.c	6 May 2010 19:13:21 -0000
@@ -450,7 +450,6 @@ call_function_by_hand (struct value *fun
   struct cleanup *terminate_bp_cleanup;
   ptid_t call_thread_ptid;
   struct gdb_exception e;
-  const char *name;
   char name_buf[RAW_FUNCTION_ADDRESS_SIZE];
 
   if (TYPE_CODE (ftype) == TYPE_CODE_PTR)
Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.265
diff -u -p -r1.265 infcmd.c
--- infcmd.c	9 Apr 2010 03:00:57 -0000	1.265
+++ infcmd.c	6 May 2010 19:13:21 -0000
@@ -832,7 +832,6 @@ static void
 step_1 (int skip_subroutines, int single_inst, char *count_string)
 {
   int count = 1;
-  struct frame_info *frame;
   struct cleanup *cleanups = make_cleanup (null_cleanup, NULL);
   int async_exec = 0;
   int thread = -1;
@@ -1994,8 +1993,6 @@ registers_info (char *addr_exp, int fpre
 {
   struct frame_info *frame;
   struct gdbarch *gdbarch;
-  int regnum, numregs;
-  char *end;
 
   if (!target_has_registers)
     error (_("The program has no registers now."));
@@ -2356,8 +2353,6 @@ attach_command_continuation_free_args (v
 void
 attach_command (char *args, int from_tty)
 {
-  char *exec_file;
-  char *full_exec_path = NULL;
   int async_exec = 0;
   struct cleanup *back_to = make_cleanup (null_cleanup, NULL);
 
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.437
diff -u -p -r1.437 infrun.c
--- infrun.c	1 May 2010 15:56:52 -0000	1.437
+++ infrun.c	6 May 2010 19:13:21 -0000
@@ -650,7 +650,6 @@ show_follow_exec_mode_string (struct ui_
 static void
 follow_exec (ptid_t pid, char *execd_pathname)
 {
-  struct target_ops *tgt;
   struct thread_info *th = inferior_thread ();
   struct inferior *inf = current_inferior ();
 
@@ -726,7 +725,6 @@ follow_exec (ptid_t pid, char *execd_pat
   if (follow_exec_mode_string == follow_exec_mode_new)
     {
       struct program_space *pspace;
-      struct inferior *new_inf;
 
       /* The user wants to keep the old inferior and program spaces
 	 around.  Create a new fresh one, and switch to it.  */
@@ -4884,7 +4882,7 @@ handle_step_into_function_backward (stru
 				    struct execution_control_state *ecs)
 {
   struct symtab *s;
-  struct symtab_and_line stop_func_sal, sr_sal;
+  struct symtab_and_line stop_func_sal;
 
   s = find_pc_symtab (stop_pc);
   if (s && s->language != language_asm)
@@ -6438,7 +6436,6 @@ _initialize_infrun (void)
 {
   int i;
   int numsigs;
-  struct cmd_list_element *c;
 
   add_info ("signals", signals_info, _("\
 What debugger does when program gets various signals.\n\
Index: stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.213
diff -u -p -r1.213 stack.c
--- stack.c	1 Apr 2010 11:23:59 -0000	1.213
+++ stack.c	6 May 2010 19:13:21 -0000
@@ -865,9 +865,6 @@ parse_frame_specification_1 (const char 
     numargs = 0;
   else
     {
-      char *addr_string;
-      struct cleanup *tmp_cleanup;
-
       numargs = 0;
       while (1)
 	{
@@ -994,7 +991,7 @@ frame_info (char *addr_exp, int from_tty
   struct symbol *func;
   struct symtab *s;
   struct frame_info *calling_frame_info;
-  int i, count, numregs;
+  int numregs;
   char *funname = 0;
   enum language funlang = language_unknown;
   const char *pc_regname;
@@ -1314,8 +1311,6 @@ backtrace_command_1 (char *count_exp, in
 
   if (info_verbose)
     {
-      struct partial_symtab *ps;
-
       /* Read in symbols for all of the frames.  Need to do this in a
          separate pass so that "Reading in symbols for xxx" messages
          don't screw up the appearance of the backtrace.  Also if
@@ -1693,8 +1688,6 @@ locals_info (char *args, int from_tty)
 static void
 catch_info (char *ignore, int from_tty)
 {
-  struct symtab_and_line *sal;
-
   /* Assume g++ compiled code; old GDB 4.16 behaviour.  */
   print_frame_label_vars (get_selected_frame (_("No frame selected.")),
                           0, gdb_stdout);

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