diff options
author | Alan Modra <amodra@gmail.com> | 2017-09-02 11:00:02 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-09-02 11:00:02 +0930 |
commit | 96d01d93c4025cddeff197c98c7947e2b8f427bd (patch) | |
tree | e6a5dd001dd23db17bf98a03759af3aefa6a7af7 /bfd | |
parent | 96fbe52eaafef0e7abffc3e4d25fd89ae8464c88 (diff) | |
download | gdb-96d01d93c4025cddeff197c98c7947e2b8f427bd.zip gdb-96d01d93c4025cddeff197c98c7947e2b8f427bd.tar.gz gdb-96d01d93c4025cddeff197c98c7947e2b8f427bd.tar.bz2 |
-Og warning fixes
Found when building with gcc 4.9.4 using -Og.
bfd/
* elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
* elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
ld/
* emultempl/msp430.em (eval_upper_either_sections): Make base_sec_name
a const char*.
(eval_lower_either_sections): Likewise.
(msp430_elf_after_allocation): Likewise, and don't needlessly concat
and free. Warning fix.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf-eh-frame.c | 2 | ||||
-rw-r--r-- | bfd/elflink.c | 2 | ||||
-rw-r--r-- | bfd/elfnn-aarch64.c | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1b3276c..5dde137 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2017-09-02 Alan Modra <amodra@gmail.com> + + * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning. + * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise. + * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise. + 2017-09-01 H.J. Lu <hongjiu.lu@intel.com> * elf32-i386.c (elf_i386_gc_mark_hook): Removed. diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c index f0ede2d..cd81b60 100644 --- a/bfd/elf-eh-frame.c +++ b/bfd/elf-eh-frame.c @@ -1335,7 +1335,7 @@ offset_adjust (bfd_vma offset, const asection *sec) struct eh_frame_sec_info *sec_info = (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info; unsigned int lo, hi, mid; - struct eh_cie_fde *ent; + struct eh_cie_fde *ent = NULL; bfd_signed_vma delta; lo = 0; diff --git a/bfd/elflink.c b/bfd/elflink.c index 6008915..58fb83b 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -6855,7 +6855,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) { const struct elf_backend_data *bed; unsigned long section_sym_count; - bfd_size_type dynsymcount; + bfd_size_type dynsymcount = 0; if (!is_elf_hash_table (info->hash)) return TRUE; diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 796fe1f..9297056 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -4944,7 +4944,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, = elfNN_aarch64_bfd_reloc_from_howto (howto); unsigned long r_symndx; bfd_byte *hit_data = contents + rel->r_offset; - bfd_vma place, off, got_entry_addr; + bfd_vma place, off, got_entry_addr = 0; bfd_signed_vma signed_addend; struct elf_aarch64_link_hash_table *globals; bfd_boolean weak_undef_p; |