This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Your binutils patch today caused a "fatal warning"
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 17 Jun 2005 11:39:14 -0400
- Subject: Re: Your binutils patch today caused a "fatal warning"
- References: <200506171528.j5HFS6te020072@ignucius.se.axis.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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