This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] cleanup: remove unused - solib
- From: Aleksandar Ristovski <aristovski at qnx dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 30 Jan 2013 22:22:22 -0500
- Subject: [patch] cleanup: remove unused - solib
- Newsgroups: gmane.comp.gdb.patches
[resend to gdb-patches]
Hello,
This is removing unused variables and allows compiling solib-svr4.c and
solib-target.c with -Wunused.
Thanks,
Aleksandar Ristovski
QNX Software Systems
ChangeLog:
Aleksandar Ristovski <aristovski@qnx.com>
* solib-svr4.c (svr4_keep_data_in_core): Remove unused LMO.
(svr4_read_so_list): Remove unused LMO.
* solib-target.c (solib_target_relocate_section_addresses): Remove
unused
FLAGS.
Index: gdb/solib-svr4.c
===================================================================
RCS file: /cvs/src/src/gdb/solib-svr4.c,v
retrieving revision 1.172
diff -u -p -r1.172 solib-svr4.c
--- gdb/solib-svr4.c 1 Jan 2013 06:32:51 -0000 1.172
+++ gdb/solib-svr4.c 31 Jan 2013 00:52:38 -0000
@@ -848,7 +848,6 @@ svr4_keep_data_in_core (CORE_ADDR vaddr,
CORE_ADDR ldsomap;
struct so_list *new;
struct cleanup *old_chain;
- struct link_map_offsets *lmo;
CORE_ADDR name_lm;
info = get_svr4_info ();
@@ -862,7 +861,6 @@ svr4_keep_data_in_core (CORE_ADDR vaddr,
if (!ldsomap)
return 0;
- lmo = svr4_fetch_link_map_offsets ();
new = XZALLOC (struct so_list);
old_chain = make_cleanup (xfree, new);
new->lm_info = lm_info_read (ldsomap);
@@ -1175,7 +1173,6 @@ svr4_read_so_list (CORE_ADDR lm, struct
for (; lm != 0; prev_lm = lm, lm = next_lm)
{
- struct link_map_offsets *lmo = svr4_fetch_link_map_offsets ();
struct so_list *new;
struct cleanup *old_chain;
int errcode;
Index: gdb/solib-target.c
===================================================================
RCS file: /cvs/src/src/gdb/solib-target.c,v
retrieving revision 1.26
diff -u -p -r1.26 solib-target.c
--- gdb/solib-target.c 1 Jan 2013 06:32:51 -0000 1.26
+++ gdb/solib-target.c 31 Jan 2013 00:52:38 -0000
@@ -333,7 +333,6 @@ static void
solib_target_relocate_section_addresses (struct so_list *so,
struct target_section *sec)
{
- int flags = bfd_get_section_flags (sec->bfd, sec->the_bfd_section);
CORE_ADDR offset;
/* Build the offset table only once per object file. We can not do