Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Aleksandar Ristovski <aristovski@qnx.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>,
	"gdb-patches@sourceware.org"	<gdb-patches@sourceware.org>
Subject: [patch] cleanup: remove unused - solib
Date: Thu, 31 Jan 2013 03:22:00 -0000	[thread overview]
Message-ID: <5109E36E.9000209@qnx.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

[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.



[-- Attachment #2: Wunused-solib-201301301952.patch --]
[-- Type: text/x-patch, Size: 1639 bytes --]

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


             reply	other threads:[~2013-01-31  3:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31  3:22 Aleksandar Ristovski [this message]
2013-01-31  6:23 ` Jan Kratochvil
2013-01-31 13:55   ` Aleksandar Ristovski

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=5109E36E.9000209@qnx.com \
    --to=aristovski@qnx.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /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