Fix relpp may be used uninitialized

Message ID 20190325223404.GD20126@bubble.grove.modra.org
State New
Headers show
Series
  • Fix relpp may be used uninitialized
Related show

Commit Message

Alan Modra March 25, 2019, 10:34 p.m.
Some versions of gcc and/or optimization levels aren't clever enough
to see that relpp really isn't used uninitialized.

	* objdump.c (dump_relocs_in_section): Warning fix.


-- 
Alan Modra
Australia Development Lab, IBM

Patch

diff --git a/binutils/objdump.c b/binutils/objdump.c
index d80b3f5a88..644638c321 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -3632,7 +3632,7 @@  dump_relocs_in_section (bfd *abfd,
 			asection *section,
 			void *dummy ATTRIBUTE_UNUSED)
 {
-  arelent **relpp;
+  arelent **relpp = NULL;
   long relcount;
   long relsize;