[v2] libctf: Remove unused variable initialized to itself

Message ID 20211022061427.14917-1-mforney@mforney.org
State New
Headers show
Series
  • [v2] libctf: Remove unused variable initialized to itself
Related show

Commit Message

Michael Forney Oct. 22, 2021, 6:14 a.m.
2021-10-06  Michael Forney  <mforney@mforney.org>

	* ctf-link.c: Remove unused variable initialized to itself.
---
v2: Remove unused name_ as well.

 libctf/ctf-link.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

-- 
2.32.0

Patch

diff --git a/libctf/ctf-link.c b/libctf/ctf-link.c
index cc99f818970..7b87864ade7 100644
--- a/libctf/ctf-link.c
+++ b/libctf/ctf-link.c
@@ -1511,7 +1511,7 @@  ctf_link_shuffle_syms (ctf_dict_t *fp)
   ctf_in_flight_dynsym_t *did, *nid;
   ctf_next_t *i = NULL;
   int err = ENOMEM;
-  void *name_, *sym_;
+  void *sym_;
 
   if (!fp->ctf_dynsyms)
     {
@@ -1592,9 +1592,8 @@  ctf_link_shuffle_syms (ctf_dict_t *fp)
 				   sizeof (ctf_link_sym_t *))) == NULL)
     goto err;
 
-  while ((err = ctf_dynhash_next (fp->ctf_dynsyms, &i, &name_, &sym_)) == 0)
+  while ((err = ctf_dynhash_next (fp->ctf_dynsyms, &i, NULL, &sym_)) == 0)
     {
-      const char *name = (const char *) name;
       ctf_link_sym_t *symp = (ctf_link_sym_t *) sym_;
 
       if (!ctf_assert (fp, symp->st_symidx <= fp->ctf_dynsymmax))