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]

Re: [PATCH] Fixes for a small number of compiler warnings


On Wed, 1 Apr 2015, Alan Modra wrote:
> On Tue, Mar 31, 2015 at 04:47:10PM +0200, Ed Schouten wrote:
> > --- a/ld/emultempl/elf32.em
> > +++ b/ld/emultempl/elf32.em
> > @@ -1412,7 +1412,7 @@ gld${EMULATION_NAME}_before_allocation (void)
> >    asection *sinterp;
> >    bfd *abfd;
> >    struct elf_link_hash_entry *ehdr_start = NULL;
> > -  struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
> > +  struct bfd_link_hash_entry ehdr_start_save = {};
> >
> >    if (is_elf_hash_table (link_info.hash))
> >      {
>
> Committed.

This broke most-target builds on Debian 7 / "gcc version 4.7.2
(Debian 4.7.2-5)", for example with arm-eabi (the -m32 is
unimportant):

gcc -O2 -m32 -DHAVE_CONFIG_H -I. -I/tmp/hpautotest-binutils/bsrc/src/ld  -I.
 -I/tmp/hpautotest-binutils/bsrc/src/ld -I../bfd -I/tmp/hpautotest-binutils/bsrc/src/ld/../bfd  -I/tmp/hpautotest-binutils/bsrc/src/ld/../include  -g -O2
 -DENABLE_PLUGINS -DLOCALEDIR="\"/usr/local/share/locale\""  -W
 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror
 -g -O2 -MT earmelf.o -MD -MP -MF .deps/earmelf.Tpo -c -o earmelf.o earmelf.c
earmelf.c: In function 'gldarmelf_before_allocation':
earmelf.c:1448:10: error: missing initializer
[-Werror=missing-field-initializers]earmelf.c:1448:10: error: (near initialization for 'ehdr_start_save.root') [-Werror=missing-field-initializers]
cc1: all warnings being treated as errors
make[4]: *** [earmelf.o] Error 1
make[4]: Leaving directory `/tmp/hpautotest-binutils/arm-unknown-eabi/ld'

brgds, H-P


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