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] c-exp.y, jv-exp.y, p-exp.y, ada-exp.y, cp-name-parser.y: eliminate unused variables


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

	* c-exp.y (parse_string_or_char): Delete unused variable.
	(c_lex): Delete unused variable.
	* cp-name-parser.y (cpname_lex): Delete unused variable.
	* ada-exp.y (find_primitive_type): Delete unused variable.
	(write_var_or_type): Delete unused variable.
	* jv-exp.y (java_parse): Delete unused variable.
	(push_expression_name): Delete unused variable.
	* p-exp.y (pascal_lex): Delete unused variable.

Index: ada-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/ada-exp.y,v
retrieving revision 1.39
diff -u -p -r1.39 ada-exp.y
--- ada-exp.y	1 Jan 2010 07:31:29 -0000	1.39
+++ ada-exp.y	6 May 2010 00:00:22 -0000
@@ -1091,7 +1091,6 @@ find_primitive_type (char *name)
     {
       /* Check to see if we have a regular definition of this
 	 type that just didn't happen to have been read yet.  */
-      int ntypes;
       struct symbol *sym;
       char *expanded_name = 
 	(char *) alloca (strlen (name) + sizeof ("standard__"));
@@ -1366,7 +1365,6 @@ write_var_or_type (struct block *block, 
 	    }
 	  else if (nsyms == 0) 
 	    {
-	      int i;
 	      struct minimal_symbol *msym 
 		= ada_lookup_simple_minsym (encoded_name);
 	      if (msym != NULL)
Index: c-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/c-exp.y,v
retrieving revision 1.73
diff -u -p -r1.73 c-exp.y
--- c-exp.y	15 Mar 2010 17:26:46 -0000	1.73
+++ c-exp.y	6 May 2010 00:00:23 -0000
@@ -1708,7 +1708,7 @@ static int
 parse_string_or_char (char *tokptr, char **outptr, struct typed_stoken *value,
 		      int *host_chars)
 {
-  int quote, i;
+  int quote;
   enum c_string_type type;
 
   /* Build the gdb internal form of the input string in tempbuf.  Note
@@ -2437,7 +2437,6 @@ static int
 yylex (void)
 {
   token_and_value current;
-  char *name;
   int first_was_coloncolon, last_was_coloncolon, first_iter;
 
   if (popping && !VEC_empty (token_and_value, token_fifo))
Index: cp-name-parser.y
===================================================================
RCS file: /cvs/src/src/gdb/cp-name-parser.y,v
retrieving revision 1.17
diff -u -p -r1.17 cp-name-parser.y
--- cp-name-parser.y	1 Jan 2010 07:31:30 -0000	1.17
+++ cp-name-parser.y	6 May 2010 00:00:23 -0000
@@ -1541,7 +1541,7 @@ yylex (void)
 {
   int c;
   int namelen;
-  const char *tokstart, *tokptr;
+  const char *tokstart;
 
  retry:
   prev_lexptr = lexptr;
Index: jv-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/jv-exp.y,v
retrieving revision 1.38
diff -u -p -r1.38 jv-exp.y
--- jv-exp.y	5 Mar 2010 20:18:14 -0000	1.38
+++ jv-exp.y	6 May 2010 00:00:23 -0000
@@ -547,7 +547,6 @@ CastExpression:
 		  write_exp_elt_opcode (UNOP_CAST); }
 |	'(' Expression ')' UnaryExpressionNotPlusMinus
 		{
-		  int exp_size = expout_ptr;
 		  int last_exp_size = length_of_subexp(expout, expout_ptr);
 		  struct type *type;
 		  int i;
@@ -1358,7 +1357,6 @@ push_expression_name (struct stoken name
 {
   char *tmp;
   struct type *typ;
-  char *ptr;
   int i;
 
   for (i = 0;  i < name.length;  i++)
Index: p-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/p-exp.y,v
retrieving revision 1.48
diff -u -p -r1.48 p-exp.y
--- p-exp.y	5 Mar 2010 20:18:14 -0000	1.48
+++ p-exp.y	6 May 2010 00:00:23 -0000
@@ -1085,7 +1085,6 @@ yylex ()
   char *tokstart;
   char *uptokstart;
   char *tokptr;
-  char *p;
   int explen, tempbufindex;
   static char *tempbuf;
   static int tempbufsize;

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