This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: more bfd tidy-ups


Based on past history, I'm going to assume these are obvious and
commit them to mainline.

Ben


2006-05-04  Ben Elliston  <bje@au.ibm.com>

        * coff-or32.c (bfd_section_from_shdr): Remove unused local
        variable `ptr'.
        * cofflink.c (process_embedded_commands): Remove unused local
        variables `had_read' and `had_shared'.
        * ecofflink.c (bfd_ecoff_debug_accumulate): Remove unused local
        variable `fdr_adr'.
        * ihex.c (ihex_read_section): Remove unused local variable `addr'.

Index: coff-or32.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-or32.c,v
retrieving revision 1.10
diff -u -p -r1.10 coff-or32.c
--- coff-or32.c 4 May 2005 15:53:02 -0000       1.10
+++ coff-or32.c 4 May 2006 05:02:44 -0000
@@ -317,11 +317,7 @@ reloc_processing (relent,reloc, symbols,
     }
   else
     {
-      asymbol *ptr;
       relent->sym_ptr_ptr = symbols + obj_convert (abfd)[reloc->r_symndx];
-
-      ptr = *(relent->sym_ptr_ptr);
-
       relent->addend = 0;
       relent->address-= section->vma;
 
Index: cofflink.c
===================================================================
RCS file: /cvs/src/src/bfd/cofflink.c,v
retrieving revision 1.58
diff -u -p -r1.58 cofflink.c
--- cofflink.c  16 Mar 2006 12:20:15 -0000      1.58
+++ cofflink.c  4 May 2006 05:02:52 -0000
@@ -1239,9 +1239,7 @@ process_embedded_commands (bfd *output_b
          asection *asec;
          int loop = 1;
          int had_write = 0;
-         int had_read = 0;
          int had_exec= 0;
-         int had_shared= 0;
 
          s += 5;
          s = get_name (s, &name);
@@ -1255,10 +1253,8 @@ process_embedded_commands (bfd *output_b
                  had_write = 1;
                  break;
                case 'R':
-                 had_read = 1;
                  break;
                case 'S':
-                 had_shared = 1;
                  break;
                case 'X':
                  had_exec = 1;
Index: ecofflink.c
===================================================================
RCS file: /cvs/src/src/bfd/ecofflink.c,v
retrieving revision 1.20
diff -u -p -r1.20 ecofflink.c
--- ecofflink.c 16 Mar 2006 12:20:15 -0000      1.20
+++ ecofflink.c 4 May 2006 05:02:58 -0000
@@ -782,7 +782,6 @@ bfd_ecoff_debug_accumulate (handle, outp
        fdr_ptr += fdr_add, i++)
     {
       FDR fdr;
-      bfd_vma fdr_adr;
       bfd_byte *sym_out;
       bfd_byte *lraw_src;
       bfd_byte *lraw_end;
@@ -799,8 +798,6 @@ bfd_ecoff_debug_accumulate (handle, outp
       else
        (*input_swap->swap_fdr_in) (input_bfd, (PTR) fdr_ptr, &fdr);
 
-      fdr_adr = fdr.adr;
-
       /* FIXME: It is conceivable that this FDR points to the .init or
         .fini section, in which case this will not do the right
         thing.  */
Index: ihex.c
===================================================================
RCS file: /cvs/src/src/bfd/ihex.c,v
retrieving revision 1.30
diff -u -p -r1.30 ihex.c
--- ihex.c      23 May 2005 17:44:54 -0000      1.30
+++ ihex.c      4 May 2006 05:02:58 -0000
@@ -553,7 +553,6 @@ ihex_read_section (bfd *abfd, asection *
     {
       char hdr[8];
       unsigned int len;
-      bfd_vma addr;
       unsigned int type;
       unsigned int i;
 
@@ -568,7 +567,6 @@ ihex_read_section (bfd *abfd, asection *
        goto error_return;
 
       len = HEX2 (hdr);
-      addr = HEX4 (hdr + 2);
       type = HEX2 (hdr + 6);
 
       /* We should only see type 0 records here.  */


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