Approved by nickc@redhat.com
authorFred Fish <fnf@specifix.com>
Tue, 29 Mar 2005 20:10:42 +0000 (20:10 +0000)
committerFred Fish <fnf@specifix.com>
Tue, 29 Mar 2005 20:10:42 +0000 (20:10 +0000)
2005-03-29  Fred Fish  <fnf@specifixinc.com>
* dwarf2.c (struct comp_unit): Fix typo.
(scan_unit_for_functions): Remove unused local variable "name"
and dead code that set it.

bfd/ChangeLog
bfd/dwarf2.c

index c4b62ddd5886722fc6e6347819df6cf8c59229ca..0b64c6213c935bcd730254f6b6d3fda7aa0a88cd 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-29  Fred Fish  <fnf@specifixinc.com>
+
+       * dwarf2.c (struct comp_unit): Fix typo.
+       (scan_unit_for_functions): Remove unused local variable "name"
+       and dead code that set it.
+
 2005-03-29  Daniel Jacobowitz  <dan@codesourcery.com>
            Phil Blundell  <philb@gnu.org>
 
index 2bd232d9da57f66e599b6566642b31c3f01eb722..9c29453d46aba271fcb27f9f7cd1c6859051bbe0 100644 (file)
@@ -132,7 +132,7 @@ struct comp_unit
   /* Keep the bdf convenient (for memory allocation).  */
   bfd *abfd;
 
-  /* The lowest and higest addresses contained in this compilation
+  /* The lowest and highest addresses contained in this compilation
      unit as specified in the compilation unit header.  */
   struct arange arange;
 
@@ -1326,7 +1326,6 @@ scan_unit_for_functions (struct comp_unit *unit)
       struct abbrev_info *abbrev;
       struct attribute attr;
       struct funcinfo *func;
-      char *name = 0;
 
       abbrev_number = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
       info_ptr += bytes_read;
@@ -1370,9 +1369,6 @@ scan_unit_for_functions (struct comp_unit *unit)
                  break;
 
                case DW_AT_name:
-
-                 name = attr.u.str;
-
                  /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name.  */
                  if (func->name == NULL)
                    func->name = attr.u.str;
@@ -1390,18 +1386,6 @@ scan_unit_for_functions (struct comp_unit *unit)
                  func->high = attr.u.val;
                  break;
 
-               default:
-                 break;
-               }
-           }
-         else
-           {
-             switch (attr.name)
-               {
-               case DW_AT_name:
-                 name = attr.u.str;
-                 break;
-
                default:
                  break;
                }