This is the mail archive of the binutils@sources.redhat.com 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]

Re: Your binutils patch today caused a "fatal warning"


On Fri, Jun 17, 2005 at 05:28:06PM +0200, Hans-Peter Nilsson wrote:
> My autotester notified me of the following breakage, building
> --target=cris-axis-elf, apparently caused by your patch:
> 
> ...
> gcc -DHAVE_CONFIG_H -I. -I/h/hp/binutils/cvs_latest/src/bfd -I. -I. -I/h/hp/binutils/cvs_latest/src/bfd -I/h/hp/binutils/cvs_latest/src/bfd/../include -I/h/hp/binutils/cvs_latest/src/bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c /h/hp/binutils/cvs_latest/src/bfd/elf.c -o elf.o
> cc1: warnings being treated as errors
> /h/hp/binutils/cvs_latest/src/bfd/elf.c: In function `bfd_section_from_shdr':
> /h/hp/binutils/cvs_latest/src/bfd/elf.c:1952: warning: comparison between signed and unsigned
> make[3]: *** [elf.lo] Error 1
> make[3]: Leaving directory `/n/asic_slask/hp/autobinutest/bfd'
> 
> (The build system is i686 RH 7.3.)

Works for me just fine.
        if (hdr->sh_entsize != (hdr->sh_type == SHT_REL
                                ? bed->s->sizeof_rel : bed->s->sizeof_rela))
          return FALSE;

Now, sizeof_rel and sizeof_rela are unsigned char, hdr->sh_entsize
is bfd_size_type, which ought to be unsigned type.

	Jakub


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