public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [COMMITTED] libdw: Remove unused variable initialization in dwarf_siblingof.
@ 2019-04-28 11:18 Mark Wielaard
  0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2019-04-28 11:18 UTC (permalink / raw)
  To: elfutils-devel; +Cc: Mark Wielaard

We immediately reassign the value of addr after declaration.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 libdw/ChangeLog         | 4 ++++
 libdw/dwarf_siblingof.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index bc446fe5a..37aab8047 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,7 @@
+2019-04-28  Mark Wielaard  <mark@klomp.org>
+
+	* dwarf_siblingof.c (dwarf_siblingof): Don't initialize addr.
+
 2019-04-28  Mark Wielaard  <mark@klomp.org>
 
 	* dwarf_getlocation.c (dwarf_getlocation_addr): Call
diff --git a/libdw/dwarf_siblingof.c b/libdw/dwarf_siblingof.c
index 613d20908..dbed9fa82 100644
--- a/libdw/dwarf_siblingof.c
+++ b/libdw/dwarf_siblingof.c
@@ -57,7 +57,7 @@ dwarf_siblingof (Dwarf_Die *die, Dwarf_Die *result)
   /* Copy of the CU in the request.  */
   sibattr.cu = this_die.cu;
   /* That's the address we start looking.  */
-  unsigned char *addr = this_die.addr;
+  unsigned char *addr;
 
   /* Search for the beginning of the next die on this level.  We
      must not return the dies for children of the given die.  */
-- 
2.20.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-28 11:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-28 11:18 [COMMITTED] libdw: Remove unused variable initialization in dwarf_siblingof Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).