This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Committing patch for PR 18623


I'm committing this patch to fix PR 18623.  The bug report is for some
warnings emitted by the Intel compiler.  The warnings are about
variables which are set but never used, and the fix is to remove the
variables.  Tested by building libiberty and running the libiberty
testsuite.

Ian


2004-11-23  Ian Lance Taylor  <ian@wasabisystems.com>

	PR other/18623
	* cp-demangle.c (d_call_offset): Remove useless local variables
	offset and virtual_offset.
	* cplus-dem.c (ada_demangle): Remove useless local variable
	at_start_name.
	(demangle_template): Remove useless local variable start.


Index: cp-demangle.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/cp-demangle.c,v
retrieving revision 1.74
diff -u -r1.74 cp-demangle.c
--- cp-demangle.c	28 Jun 2004 15:23:33 -0000	1.74
+++ cp-demangle.c	24 Nov 2004 02:14:55 -0000
@@ -1633,20 +1633,17 @@
      struct d_info *di;
      int c;
 {
-  long offset;
-  long virtual_offset;
-
   if (c == '\0')
     c = d_next_char (di);
 
   if (c == 'h')
-    offset = d_number (di);
+    d_number (di);
   else if (c == 'v')
     {
-      offset = d_number (di);
+      d_number (di);
       if (d_next_char (di) != '_')
 	return 0;
-      virtual_offset = d_number (di);
+      d_number (di);
     }
   else
     return 0;
Index: cplus-dem.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/cplus-dem.c,v
retrieving revision 1.95
diff -u -r1.95 cplus-dem.c
--- cplus-dem.c	2 Jan 2004 20:33:54 -0000	1.95
+++ cplus-dem.c	24 Nov 2004 02:14:56 -0000
@@ -976,7 +976,6 @@
   int len0;
   const char* p;
   char *demangled = NULL;
-  int at_start_name;
   int changed;
   size_t demangled_size = 0;
   
@@ -1029,15 +1028,12 @@
        i += 1, j += 1)
     demangled[j] = mangled[i];
   
-  at_start_name = 1;
   while (i < len0)
     {
-      at_start_name = 0;
-      
       if (i < len0 - 2 && mangled[i] == '_' && mangled[i + 1] == '_')
 	{
 	  demangled[j] = '.';
-	  changed = at_start_name = 1;
+	  changed = 1;
 	  i += 2; j += 1;
 	}
       else
@@ -2040,14 +2036,12 @@
   int r;
   int need_comma = 0;
   int success = 0;
-  const char *start;
   int is_java_array = 0;
   string temp;
 
   (*mangled)++;
   if (is_type)
     {
-      start = *mangled;
       /* get template name */
       if (**mangled == 'z')
 	{


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