From: Mark Wielaard <mark@klomp.org>
To: elfutils-devel@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [COMMITTED] libdw: Remove unused variable initialization in dwarf_siblingof.
Date: Sun, 28 Apr 2019 11:18:00 -0000 [thread overview]
Message-ID: <20190428111835.21507-1-mark@klomp.org> (raw)
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
reply other threads:[~2019-04-28 11:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190428111835.21507-1-mark@klomp.org \
--to=mark@klomp.org \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).