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] eval, valops, valarith, valprint, printcmd.c: delete unused variables.


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

	* eval.c (evaluate_subexp_standard): Delete unused variable.
	* valops.c (value_cast_pointers): Delete unused variable.
	(value_dynamic_cast): Delete unused variable.
	(value_array): Delete unused variable.
	(find_overload_match): Delete unused variable.
	* valarith.c (value_subscript): Delete unused variable.
	(value_binop): Delete unused variable.
	* valprint.c (_initialize_valprint): Delete unused variable.
	* printcmd.c (print_command_1): Delete unused variable.
	(address_info): Delete unused variable.
	(printf_command): Delete unused variable.

Index: eval.c
===================================================================
RCS file: /cvs/src/src/gdb/eval.c,v
retrieving revision 1.129
diff -u -p -r1.129 eval.c
--- eval.c	15 Mar 2010 17:29:36 -0000	1.129
+++ eval.c	6 May 2010 18:25:21 -0000
@@ -690,7 +690,7 @@ evaluate_subexp_standard (struct type *e
   struct type *type;
   int nargs;
   struct value **argvec;
-  int upper, lower, retcode;
+  int upper, lower;
   int code;
   int ix;
   long mem_offset;
@@ -1418,7 +1418,6 @@ evaluate_subexp_standard (struct type *e
 	{
 	  /* Unpack it locally so we can properly handle overload
 	     resolution.  */
-	  struct type *qual_type;
 	  char *name;
 	  int local_tem;
 
Index: valops.c
===================================================================
RCS file: /cvs/src/src/gdb/valops.c,v
retrieving revision 1.239
diff -u -p -r1.239 valops.c
--- valops.c	15 Mar 2010 17:29:36 -0000	1.239
+++ valops.c	6 May 2010 18:25:21 -0000
@@ -298,7 +298,6 @@ value_cast_structs (struct type *type, s
 struct value *
 value_cast_pointers (struct type *type, struct value *arg2)
 {
-  struct type *type1 = check_typedef (type);
   struct type *type2 = check_typedef (value_type (arg2));
   struct type *t1 = check_typedef (TYPE_TARGET_TYPE (type));
   struct type *t2 = check_typedef (TYPE_TARGET_TYPE (type2));
@@ -695,7 +694,7 @@ dynamic_cast_check_2 (struct type *desir
 struct value *
 value_dynamic_cast (struct type *type, struct value *arg)
 {
-  int unambiguous = 0, full, top, using_enc;
+  int full, top, using_enc;
   struct type *resolved_type = check_typedef (type);
   struct type *arg_type = check_typedef (value_type (arg));
   struct type *class_type, *rtti_type;
@@ -1614,7 +1613,6 @@ value_array (int lowbound, int highbound
   unsigned int typelength;
   struct value *val;
   struct type *arraytype;
-  CORE_ADDR addr;
 
   /* Validate that the bounds are reasonable and that each of the
      elements have the same size.  */
@@ -2334,8 +2332,6 @@ find_overload_match (struct type **arg_t
   int num_fns = 0;
   struct type *basetype = NULL;
   int boffset;
-  int ix;
-  int static_offset;
   struct cleanup *old_cleanups = NULL;
 
   const char *obj_type_name = NULL;
Index: valarith.c
===================================================================
RCS file: /cvs/src/src/gdb/valarith.c,v
retrieving revision 1.82
diff -u -p -r1.82 valarith.c
--- valarith.c	16 Mar 2010 20:51:23 -0000	1.82
+++ valarith.c	6 May 2010 18:25:21 -0000
@@ -146,7 +146,6 @@ an integer nor a pointer of the same typ
 struct value *
 value_subscript (struct value *array, LONGEST index)
 {
-  struct value *bound;
   int c_style = current_language->c_style_arrays;
   struct type *tarray;
 
@@ -881,7 +880,6 @@ value_binop (struct value *arg1, struct 
   if (TYPE_CODE (type1) == TYPE_CODE_DECFLOAT
       || TYPE_CODE (type2) == TYPE_CODE_DECFLOAT)
     {
-      struct type *v_type;
       int len_v1, len_v2, len_v;
       enum bfd_endian byte_order_v1, byte_order_v2, byte_order_v;
       gdb_byte v1[16], v2[16];
Index: valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/valprint.c,v
retrieving revision 1.91
diff -u -p -r1.91 valprint.c
--- valprint.c	20 Apr 2010 22:26:56 -0000	1.91
+++ valprint.c	6 May 2010 18:25:21 -0000
@@ -1631,8 +1631,6 @@ show_print (char *args, int from_tty)
 void
 _initialize_valprint (void)
 {
-  struct cmd_list_element *c;
-
   add_prefix_cmd ("print", no_class, set_print,
 		  _("Generic command for setting how things print."),
 		  &setprintlist, "set print ", 0, &setlist);
Index: printcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/printcmd.c,v
retrieving revision 1.177
diff -u -p -r1.177 printcmd.c
--- printcmd.c	4 May 2010 06:48:26 -0000	1.177
+++ printcmd.c	6 May 2010 18:25:21 -0000
@@ -959,7 +959,6 @@ print_command_1 (char *exp, int inspect,
 
   if (exp && *exp)
     {
-      struct type *type;
       expr = parse_expression (exp);
       old_chain = make_cleanup (free_current_contents, &expr);
       cleanup = 1;
@@ -1175,7 +1174,6 @@ sym_info (char *arg, int from_tty)
 static void
 address_info (char *exp, int from_tty)
 {
-  struct block *block;
   struct gdbarch *gdbarch;
   int regno;
   struct symbol *sym;
@@ -2383,7 +2381,6 @@ printf_command (char *arg, int from_tty)
 	    {
 	      struct gdbarch *gdbarch
 		= get_type_arch (value_type (val_args[i]));
-	      enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
 	      struct type *wctype = lookup_typename (current_language, gdbarch,
 						     "wchar_t", NULL, 0);
 	      struct type *valtype;

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