[binutils-gdb] elf-hppa.h warning fix
Alan Modra
amodra@sourceware.org
Wed Apr 4 23:47:00 GMT 2018
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0e8452bb2297b5eb98a447f357ac82bece4e7024
commit 0e8452bb2297b5eb98a447f357ac82bece4e7024
Author: Alan Modra <amodra@gmail.com>
Date: Wed Apr 4 12:00:22 2018 +0930
elf-hppa.h warning fix
* elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
(elf_hppa_info_to_howto_rel): Likewise.
Diff:
---
bfd/ChangeLog | 5 +++++
bfd/elf-hppa.h | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8921ab0..c7fce7d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2018-04-05 Alan Modra <amodra@gmail.com>
+
+ * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
+ (elf_hppa_info_to_howto_rel): Likewise.
+
2018-04-04 Maciej W. Rozycki <macro@mips.com>
* elf-hppa.h (elf_hppa_info_to_howto): Also return
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index f23f788..5eac129 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -1027,7 +1027,7 @@ elf_hppa_info_to_howto (bfd *abfd,
{
unsigned int r_type = ELF32_R_TYPE (elf_reloc->r_info);
unsigned int type = r_type;
- reloc_howto_type *howto;
+ reloc_howto_type *howto = NULL;
if (r_type < (unsigned int) R_PARISC_UNIMPLEMENTED)
{
@@ -1055,7 +1055,7 @@ elf_hppa_info_to_howto_rel (bfd *abfd,
{
unsigned int r_type = ELF_R_TYPE (elf_reloc->r_info);
unsigned int type = r_type;
- reloc_howto_type *howto;
+ reloc_howto_type *howto = NULL;
if (r_type < (unsigned int) R_PARISC_UNIMPLEMENTED)
{
More information about the Binutils-cvs
mailing list