* elf.c (bfd_section_from_shdr): Kill bogus warning.
authorJakub Jelinek <jakub@redhat.com>
Fri, 17 Jun 2005 15:48:25 +0000 (15:48 +0000)
committerJakub Jelinek <jakub@redhat.com>
Fri, 17 Jun 2005 15:48:25 +0000 (15:48 +0000)
bfd/ChangeLog
bfd/elf.c

index f47dac29b0c90904f4fe03945805a12e08bdf92f..3d87dd1897f51046f5023828fb5016ecc46c3029 100644 (file)
@@ -1,5 +1,7 @@
 2005-06-17  Jakub Jelinek  <jakub@redhat.com>
 
+       * elf.c (bfd_section_from_shdr): Kill bogus warning.
+
        * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
        symbol, relocation, group or versym sections.
 
index d301a9e14fd38583ed345d400f5082f98610537e..590ce35328d162fa5cf935375e0572eccc77aed4 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1948,7 +1948,8 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
        Elf_Internal_Shdr *hdr2;
        unsigned int num_sec = elf_numsections (abfd);
 
-       if (hdr->sh_entsize != (hdr->sh_type == SHT_REL
+       if (hdr->sh_entsize
+           != (bfd_size_type) (hdr->sh_type == SHT_REL
                                ? bed->s->sizeof_rel : bed->s->sizeof_rela))
          return FALSE;