OSDN Git Service

* archive.c (bfd_generic_archive_p): Remove unused local variable
authorbje <bje>
Tue, 2 May 2006 10:01:56 +0000 (10:01 +0000)
committerbje <bje>
Tue, 2 May 2006 10:01:56 +0000 (10:01 +0000)
`fail'.
* dwarf2.c (decode_line_info): Remove unused local variable
`basic_block'.
* elfcode.h (elf_slurp_reloc_table_from_section): Remove unsed
local varibale `s'.
* tekhex.c (tekhex_write_object_contents): Remove unused local
variable `bytes_written'.
* aout-ns32k.c (MY_swap_std_reloc_out): Remove unused local
variable `r_addend'.
* elf32-dlx.c (dlx_rtype_to_howto): Remove breaks after returns.
* elfxx-mips.c (_bfd_elf_mips_mach): Remove breaks after returns.
(_bfd_ns32k_relocate_contents): Remove break after return.
* elf.c (bfd_section_from_shdr): Remove breaks after returns.

bfd/ChangeLog
bfd/aout-ns32k.c
bfd/archive.c
bfd/dwarf2.c
bfd/elf.c
bfd/elf32-dlx.c
bfd/elfcode.h
bfd/elfxx-mips.c
bfd/tekhex.c

index 4dad85f..9381660 100644 (file)
@@ -1,3 +1,20 @@
+2006-05-02  Ben Elliston  <bje@au.ibm.com>
+
+       * archive.c (bfd_generic_archive_p): Remove unused local variable
+       `fail'.
+       * dwarf2.c (decode_line_info): Remove unused local variable
+       `basic_block'.
+       * elfcode.h (elf_slurp_reloc_table_from_section): Remove unsed
+       local varibale `s'.
+       * tekhex.c (tekhex_write_object_contents): Remove unused local
+       variable `bytes_written'.
+       * aout-ns32k.c (MY_swap_std_reloc_out): Remove unused local
+       variable `r_addend'.
+       * elf32-dlx.c (dlx_rtype_to_howto): Remove breaks after returns.
+       * elfxx-mips.c (_bfd_elf_mips_mach): Remove breaks after returns.
+       (_bfd_ns32k_relocate_contents): Remove break after return.
+       * elf.c (bfd_section_from_shdr): Remove breaks after returns.
+
 2006-05-02  Nick Clifton  <nickc@redhat.com>
 
        * elf32-sh-symbian.c: Rename local define DEBUG to SYMBIAN_DEBUG
index cc9f06d..86cdcd5 100644 (file)
@@ -274,11 +274,8 @@ MY_swap_std_reloc_out (bfd *abfd,
   int r_index;
   asymbol *sym = *(g->sym_ptr_ptr);
   int r_extern;
-  unsigned int r_addend;
   asection *output_section = sym->section->output_section;
 
-  r_addend = g->addend + (*(g->sym_ptr_ptr))->section->output_section->vma;
-
   /* Name was clobbered by aout_write_syms to be symbol index.  */
 
   /* If this relocation is relative to a symbol then set the
@@ -341,7 +338,6 @@ _bfd_ns32k_relocate_contents (reloc_howto_type *howto,
     case 2:
       return _bfd_relocate_contents (howto, input_bfd, relocation,
                                    location);
-      break;
     default:
       return bfd_reloc_notsupported;
     }
index 5a12f01..d6930fb 100644 (file)
@@ -666,10 +666,7 @@ bfd_generic_archive_p (bfd *abfd)
       first = bfd_openr_next_archived_file (abfd, NULL);
       if (first != NULL)
        {
-         bfd_boolean fail;
-
          first->target_defaulted = FALSE;
-         fail = FALSE;
          if (bfd_check_format (first, bfd_object)
              && first->xvec != abfd->xvec)
            {
index ea4ece4..b55f2fa 100644 (file)
@@ -1117,7 +1117,6 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
       unsigned int line = 1;
       unsigned int column = 0;
       int is_stmt = lh.default_is_stmt;
-      int basic_block = 0;
       int end_sequence = 0;
       /* eraxxon@alumni.rice.edu: Against the DWARF2 specs, some
         compilers generate address sequences that are wildly out of
@@ -1142,7 +1141,6 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
              line += lh.line_base + (adj_opcode % lh.line_range);
              /* Append row to matrix using current values.  */
              add_line_info (table, address, filename, line, column, 0);
-             basic_block = 1;
              if (address < low_pc)
                low_pc = address;
              if (address > high_pc)
@@ -1214,7 +1212,6 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
              break;
            case DW_LNS_copy:
              add_line_info (table, address, filename, line, column, 0);
-             basic_block = 0;
              if (address < low_pc)
                low_pc = address;
              if (address > high_pc)
@@ -1250,7 +1247,6 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
              is_stmt = (!is_stmt);
              break;
            case DW_LNS_set_basic_block:
-             basic_block = 1;
              break;
            case DW_LNS_const_add_pc:
              address += lh.minimum_instruction_length
index e697722..3c13622 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2113,13 +2113,11 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
       elf_dynversym (abfd) = shindex;
       elf_tdata (abfd)->dynversym_hdr = *hdr;
       return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
-      break;
 
     case SHT_GNU_verneed:
       elf_dynverref (abfd) = shindex;
       elf_tdata (abfd)->dynverref_hdr = *hdr;
       return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
-      break;
 
     case SHT_SHLIB:
       return TRUE;
index ae42baf..b1f6257 100644 (file)
@@ -512,21 +512,15 @@ dlx_rtype_to_howto (unsigned int r_type)
     {
     case R_DLX_RELOC_16_PCREL:
       return & elf_dlx_gnu_rel16_s2;
-      break;
     case R_DLX_RELOC_26_PCREL:
       return & elf_dlx_gnu_rel26_s2;
-      break;
     case R_DLX_RELOC_16_HI:
       return & elf_dlx_reloc_16_hi;
-      break;
     case R_DLX_RELOC_16_LO:
       return & elf_dlx_reloc_16_lo;
-      break;
-
     default:
       BFD_ASSERT (r_type < (unsigned int) R_DLX_max);
       return & dlx_elf_howto_table[r_type];
-      break;
     }
 }
 
index 5a54fc2..fbf1c3f 100644 (file)
@@ -1350,10 +1350,8 @@ elf_slurp_reloc_table_from_section (bfd *abfd,
        }
       else
        {
-         asymbol **ps, *s;
-
+         asymbol **ps;
          ps = symbols + ELF_R_SYM (rela.r_info) - 1;
-         s = *ps;
 
          relent->sym_ptr_ptr = ps;
        }
index 4e27a53..478a471 100644 (file)
@@ -4955,39 +4955,30 @@ _bfd_elf_mips_mach (flagword flags)
        default:
        case E_MIPS_ARCH_1:
          return bfd_mach_mips3000;
-         break;
 
        case E_MIPS_ARCH_2:
          return bfd_mach_mips6000;
-         break;
 
        case E_MIPS_ARCH_3:
          return bfd_mach_mips4000;
-         break;
 
        case E_MIPS_ARCH_4:
          return bfd_mach_mips8000;
-         break;
 
        case E_MIPS_ARCH_5:
          return bfd_mach_mips5;
-         break;
 
        case E_MIPS_ARCH_32:
          return bfd_mach_mipsisa32;
-         break;
 
        case E_MIPS_ARCH_64:
          return bfd_mach_mipsisa64;
-         break;
 
        case E_MIPS_ARCH_32R2:
          return bfd_mach_mipsisa32r2;
-         break;
 
        case E_MIPS_ARCH_64R2:
          return bfd_mach_mipsisa64r2;
-         break;
        }
     }
 
index afe42cc..e40c866 100644 (file)
@@ -751,7 +751,6 @@ out (bfd *abfd, int type, char *start, char *end)
 static bfd_boolean
 tekhex_write_object_contents (bfd *abfd)
 {
-  int bytes_written;
   char buffer[100];
   asymbol **p;
   asection *s;
@@ -759,8 +758,6 @@ tekhex_write_object_contents (bfd *abfd)
 
   tekhex_init ();
 
-  bytes_written = 0;
-
   /* And the raw data.  */
   for (d = abfd->tdata.tekhex_data->data;
        d != NULL;