[COMMITTED] libdw: Remove unused variable initialization in dwarf_siblingof.
Mark Wielaard
mark@klomp.org
Sun Apr 28 11:18:00 GMT 2019
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
More information about the Elfutils-devel
mailing list