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] cleanup: Wunused - auto, ax, block, break


Hello,

This is removing unused variables and allows compiling with -Wunused.

Thanks,

Aleksandar Ristovski
QNX Software Systems

ChangeLog:

Aleksandar Ristovski <aristovski@qnx.com>

     * auto-load.c (auto_load_expand_dir_vars): Remove unused DIR_VEC.
     * ax-gdb.c (gen_printf): Remove unused EXPR, I, BOT, FR, FLEN, FMT.
     * ax-general.c (ax_print): Remove unused IS_FLOAT.
     * blockframe.c (block_innermost_frame): Remove unused START, END.
     * break-catch-sig.c (catch_signal_command): Remove unused GDBARCH.


Index: gdb/auto-load.c
===================================================================
RCS file: /cvs/src/src/gdb/auto-load.c,v
retrieving revision 1.19
diff -u -p -r1.19 auto-load.c
--- gdb/auto-load.c	1 Jan 2013 06:32:39 -0000	1.19
+++ gdb/auto-load.c	30 Jan 2013 22:25:14 -0000
@@ -178,7 +178,6 @@ auto_load_expand_dir_vars (const char *s
 static void
 auto_load_safe_path_vec_update (void)
 {
-  VEC (char_ptr) *dir_vec = NULL;
   unsigned len;
   int ix;
 
Index: gdb/ax-gdb.c
===================================================================
RCS file: /cvs/src/src/gdb/ax-gdb.c,v
retrieving revision 1.107
diff -u -p -r1.107 ax-gdb.c
--- gdb/ax-gdb.c	1 Jan 2013 06:32:39 -0000	1.107
+++ gdb/ax-gdb.c	30 Jan 2013 22:25:14 -0000
@@ -2562,13 +2562,11 @@ gen_printf (CORE_ADDR scope, struct gdba
 	    struct format_piece *frags,
 	    int nargs, struct expression **exprs)
 {
-  struct expression *expr;
   struct cleanup *old_chain = 0;
   struct agent_expr *ax = new_agent_expr (gdbarch, scope);
   union exp_element *pc;
   struct axs_value value;
-  int i, tem, bot, fr, flen;
-  char *fmt;
+  int tem;
 
   old_chain = make_cleanup_free_agent_expr (ax);
 
Index: gdb/ax-general.c
===================================================================
RCS file: /cvs/src/src/gdb/ax-general.c,v
retrieving revision 1.31
diff -u -p -r1.31 ax-general.c
--- gdb/ax-general.c	1 Jan 2013 06:32:39 -0000	1.31
+++ gdb/ax-general.c	30 Jan 2013 22:25:14 -0000
@@ -375,7 +375,6 @@ void
 ax_print (struct ui_file *f, struct agent_expr *x)
 {
   int i;
-  int is_float = 0;
 
   fprintf_filtered (f, _("Scope: %s\n"), paddress (x->gdbarch, x->scope));
   fprintf_filtered (f, _("Reg mask:"));
@@ -430,8 +429,6 @@ ax_print (struct ui_file *f, struct agen
 	}
       fprintf_filtered (f, "\n");
       i += 1 + aop_map[op].op_size;
-
-      is_float = (op == aop_float);
     }
 }
 
Index: gdb/blockframe.c
===================================================================
RCS file: /cvs/src/src/gdb/blockframe.c,v
retrieving revision 1.138
diff -u -p -r1.138 blockframe.c
--- gdb/blockframe.c	1 Jan 2013 06:32:39 -0000	1.138
+++ gdb/blockframe.c	30 Jan 2013 22:25:14 -0000
@@ -360,15 +360,10 @@ struct frame_info *
 block_innermost_frame (const struct block *block)
 {
   struct frame_info *frame;
-  CORE_ADDR start;
-  CORE_ADDR end;
 
   if (block == NULL)
     return NULL;
 
-  start = BLOCK_START (block);
-  end = BLOCK_END (block);
-
   frame = get_selected_frame_if_set ();
   if (frame == NULL)
     frame = get_current_frame ();
Index: gdb/break-catch-sig.c
===================================================================
RCS file: /cvs/src/src/gdb/break-catch-sig.c,v
retrieving revision 1.1
diff -u -p -r1.1 break-catch-sig.c
--- gdb/break-catch-sig.c	16 Jan 2013 17:31:37 -0000	1.1
+++ gdb/break-catch-sig.c	30 Jan 2013 22:25:14 -0000
@@ -444,7 +444,6 @@ catch_signal_command (char *arg, int fro
 {
   int tempflag, catch_all = 0;
   VEC (gdb_signal_type) *filter;
-  struct gdbarch *gdbarch = get_current_arch ();
 
   tempflag = get_cmd_context (command) == CATCH_TEMPORARY;
 


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