From: Alan Modra Date: Wed, 1 Apr 2015 02:31:38 +0000 (+1030) Subject: Yet another warning fix X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=4a0bc59ef6e01733bb70950ad546c66e4c3317ea;p=deliverable%2Fbinutils-gdb.git Yet another warning fix Older compilers that warn wrongly will just need -Wno-error. No way am I going to init every single field, then have to edit this code whenever bfd_link_hash_entry changes. Another option, making the struct static, isn't very nice since it means larger binaries and worse code. * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Don't init ehdr_start_save. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 5620dec37e..6b929aac24 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2015-04-01 Alan Modra + + * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Don't + init ehdr_start_save. + 2015-04-01 Alan Modra * Makefile.am (eelf32ppcvxworks.c): Depend on ppc32elf.em and diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 2caddbe7f1..ece2fb054d 100644 --- 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 = {}; + struct bfd_link_hash_entry ehdr_start_save; if (is_elf_hash_table (link_info.hash)) {