From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25982 invoked by alias); 2 May 2006 07:50:13 -0000 Received: (qmail 25974 invoked by uid 22791); 2 May 2006 07:50:12 -0000 X-Spam-Check-By: sourceware.org Received: from ausmtp04.au.ibm.com (HELO ausmtp04.au.ibm.com) (202.81.18.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 02 May 2006 07:50:07 +0000 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp04.au.ibm.com (8.13.6/8.13.5) with ESMTP id k4280Mjs195208 for ; Tue, 2 May 2006 18:00:23 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.250.237]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k427rJsM232178 for ; Tue, 2 May 2006 17:53:19 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.12.11/8.13.3) with ESMTP id k427nxe4029302 for ; Tue, 2 May 2006 17:49:59 +1000 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.190.163.12]) by d23av04.au.ibm.com (8.12.11/8.12.11) with ESMTP id k427nw18028974 for ; Tue, 2 May 2006 17:49:59 +1000 Received: by ozlabs.au.ibm.com (Postfix, from userid 1017) id B920E73746; Tue, 2 May 2006 17:50:53 +1000 (EST) Date: Tue, 02 May 2006 07:50:00 -0000 From: Ben Elliston To: binutils@sourceware.org Subject: PATCH: more tidy-ups Message-ID: <20060502075053.GA5553@ozlabs.au.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00026.txt.bz2 More trivial patches from my local tree. I think these are all completely obvious, but again, an inspection from someone else would not hurt! Tested with an all-targets build. Ben 2006-05-02 Ben Elliston * 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. Index: archive.c =================================================================== RCS file: /cvs/src/src/bfd/archive.c,v retrieving revision 1.43 diff -u -p -r1.43 archive.c --- archive.c 5 Oct 2005 21:24:23 -0000 1.43 +++ archive.c 2 May 2006 06:43:11 -0000 @@ -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: dwarf2.c =================================================================== RCS file: /cvs/src/src/bfd/dwarf2.c,v retrieving revision 1.88 diff -u -p -r1.88 dwarf2.c --- dwarf2.c 2 May 2006 01:41:20 -0000 1.88 +++ dwarf2.c 2 May 2006 06:43:12 -0000 @@ -1117,7 +1117,6 @@ decode_line_info (struct comp_unit *unit 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 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 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 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: elfcode.h =================================================================== RCS file: /cvs/src/src/bfd/elfcode.h,v retrieving revision 1.75 diff -u -p -r1.75 elfcode.h --- elfcode.h 2 May 2006 01:41:20 -0000 1.75 +++ elfcode.h 2 May 2006 06:43:12 -0000 @@ -1350,10 +1350,8 @@ elf_slurp_reloc_table_from_section (bfd } else { - asymbol **ps, *s; - + asymbol **ps; ps = symbols + ELF_R_SYM (rela.r_info) - 1; - s = *ps; relent->sym_ptr_ptr = ps; } Index: tekhex.c =================================================================== RCS file: /cvs/src/src/bfd/tekhex.c,v retrieving revision 1.27 diff -u -p -r1.27 tekhex.c --- tekhex.c 27 Apr 2006 05:57:09 -0000 1.27 +++ tekhex.c 2 May 2006 06:43:13 -0000 @@ -751,7 +751,6 @@ out (bfd *abfd, int type, char *start, c 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; Index: aout-ns32k.c =================================================================== RCS file: /cvs/src/src/bfd/aout-ns32k.c,v retrieving revision 1.17 diff -u -p -r1.17 aout-ns32k.c --- aout-ns32k.c 4 May 2005 15:52:59 -0000 1.17 +++ aout-ns32k.c 2 May 2006 06:43:13 -0000 @@ -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_howt case 2: return _bfd_relocate_contents (howto, input_bfd, relocation, location); - break; default: return bfd_reloc_notsupported; } Index: elf32-dlx.c =================================================================== RCS file: /cvs/src/src/bfd/elf32-dlx.c,v retrieving revision 1.16 diff -u -p -r1.16 elf32-dlx.c --- elf32-dlx.c 1 Jul 2005 11:16:29 -0000 1.16 +++ elf32-dlx.c 2 May 2006 06:43:13 -0000 @@ -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: elfxx-mips.c =================================================================== RCS file: /cvs/src/src/bfd/elfxx-mips.c,v retrieving revision 1.165 diff -u -p -r1.165 elfxx-mips.c --- elfxx-mips.c 27 Mar 2006 11:30:53 -0000 1.165 +++ elfxx-mips.c 2 May 2006 06:43:16 -0000 @@ -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: elf.c =================================================================== RCS file: /cvs/src/src/bfd/elf.c,v retrieving revision 1.333 diff -u -p -r1.333 elf.c --- elf.c 26 Apr 2006 13:32:26 -0000 1.333 +++ elf.c 2 May 2006 06:43:18 -0000 @@ -2113,13 +2113,11 @@ bfd_section_from_shdr (bfd *abfd, unsign 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;