public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ben Elliston <bje@au1.ibm.com>
To: binutils@sourceware.org
Subject: PATCH: more bfd tidy-ups
Date: Thu, 04 May 2006 05:04:00 -0000	[thread overview]
Message-ID: <20060504050542.GA7823@ozlabs.au.ibm.com> (raw)

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.  */

                 reply	other threads:[~2006-05-04  5:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060504050542.GA7823@ozlabs.au.ibm.com \
    --to=bje@au1.ibm.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).