Fix relpp may be used uninitialized

Message ID
State New
Headers show
  • 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


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;