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: remove some unreachable breaks


Committed as obvious.  Also found with my static analysis tool.  ;-)

2006-10-26  Ben Elliston  <bje@au.ibm.com>

        * elf.c (bfd_section_from_shdr): Remove extraneous breaks.
        * targets.c (find_target): Remove extraneous break.

Index: elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.360
diff -u -p -r1.360 elf.c
--- elf.c       26 Oct 2006 00:01:31 -0000      1.360
+++ elf.c       26 Oct 2006 00:13:10 -0000
@@ -2126,13 +2126,11 @@ bfd_section_from_shdr (bfd *abfd, unsign
        abfd->flags |= HAS_RELOC;
        return TRUE;
       }
-      break;
 
     case SHT_GNU_verdef:
       elf_dynverdef (abfd) = shindex;
       elf_tdata (abfd)->dynverdef_hdr = *hdr;
       return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
-      break;
 
     case SHT_GNU_versym:
       if (hdr->sh_entsize != sizeof (Elf_External_Versym))
Index: targets.c
===================================================================
RCS file: /cvs/src/src/bfd/targets.c,v
retrieving revision 1.154
diff -u -p -r1.154 targets.c
--- targets.c   25 Oct 2006 06:49:20 -0000      1.154
+++ targets.c   26 Oct 2006 00:13:10 -0000
@@ -1290,7 +1290,6 @@ find_target (const char *name)
          while (match->vector == NULL)
            ++match;
          return match->vector;
-         break;
        }
     }
 


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