aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorEd Schouten <ed@nuxi.nl>2015-03-31 16:47:10 +0200
committerAlan Modra <amodra@gmail.com>2015-04-01 11:06:14 +1030
commit4e791d0fb1173330424b69cfbdece9e1764186a6 (patch)
tree25bfc6675cd646b45f6a67b551d98c69df40a457 /ld/emultempl
parent2ae0baa450dc21cf248cc932d05d9e1fd154e141 (diff)
downloadgdb-4e791d0fb1173330424b69cfbdece9e1764186a6.zip
gdb-4e791d0fb1173330424b69cfbdece9e1764186a6.tar.gz
gdb-4e791d0fb1173330424b69cfbdece9e1764186a6.tar.bz2
Fixes for a small number of compiler warnings
The ehdr_start_save variable does not need to be initialized. However, not initializing it will trigger a compiler warning when using older versions of GCC. Self-assignment unfortunately doesn't work for Clang as Clang has a warning similar to -Winit-self as part of -Wall. * emultempl/elf32.em (gld*_before_allocation): Zero-initialize the ehdr_start_save variable.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/elf32.em2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 618e20a..2caddbe 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 = ehdr_start_save;
+ struct bfd_link_hash_entry ehdr_start_save = {};
if (is_elf_hash_table (link_info.hash))
{