Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>
Subject: [RFA/commit 1/2] Unused local variables in xcoffread.c:read_xcoff_symtab
Date: Mon, 16 Apr 2012 21:14:00 -0000	[thread overview]
Message-ID: <1334610821-10974-2-git-send-email-brobecker@adacore.com> (raw)
In-Reply-To: <1334610821-10974-1-git-send-email-brobecker@adacore.com>

Some local variables are being set, but never used.  This patch deletes
them.

gdb/ChangeLog:

        * xcoffread.c (read_xcoff_symtab): Delete variables
        last_csect_val and last_csect_sec and associated code.

This patch is actually independent of the series, but it was triggered
by the investigation of the internal-error when creating a breakpoint.
I will commit as soon as testing is complete.

---
 gdb/xcoffread.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 86ae8fb..fcabddb 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -986,9 +986,7 @@ read_xcoff_symtab (struct partial_symtab *pst)
 
   char *filestring = " _start_ ";	/* Name of the current file.  */
 
-  const char *last_csect_name;	/* Last seen csect's name and value.  */
-  CORE_ADDR last_csect_val;
-  int last_csect_sec;
+  const char *last_csect_name;	/* Last seen csect's name.  */
 
   this_symtab_psymtab = pst;
 
@@ -998,7 +996,6 @@ read_xcoff_symtab (struct partial_symtab *pst)
 
   last_source_file = NULL;
   last_csect_name = 0;
-  last_csect_val = 0;
 
   start_stabs ();
   start_symtab (filestring, (char *) NULL, file_start_addr);
@@ -1171,14 +1168,8 @@ read_xcoff_symtab (struct partial_symtab *pst)
 						SECT_OFF_TEXT (objfile));
 		      file_end_addr = file_start_addr + CSECT_LEN (&main_aux);
 
-		      if (cs->c_name && (cs->c_name[0] == '.'
-					 || cs->c_name[0] == '@'))
-			{
-			  last_csect_name = cs->c_name;
-			  last_csect_val = cs->c_value;
-			  last_csect_sec = secnum_to_section (cs->c_secnum,
-							      objfile);
-			}
+		      if (cs->c_name && (cs->c_name[0] == '.' || cs->c_name[0] == '@'))
+			last_csect_name = cs->c_name;
 		    }
 		    continue;
 
-- 
1.6.5.rc2


  reply	other threads:[~2012-04-16 21:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16 21:14 RFC: bfd_section should not be NULL in call to prim_record_minimal_* Joel Brobecker
2012-04-16 21:14 ` Joel Brobecker [this message]
2012-04-16 21:19   ` [RFA/commit 2/2] pspace != NULL failed assertion on ppc-aix Joel Brobecker
2012-04-18  0:43     ` Joel Brobecker
2012-04-18 10:17       ` Pedro Alves
2012-04-18 14:57         ` Joel Brobecker
2012-04-18 15:13           ` Pedro Alves
2012-04-18  0:32   ` checked in: [RFA/commit 1/2] Unused local variables in xcoffread.c:read_xcoff_symtab Joel Brobecker
2012-04-17 12:03 ` RFC: bfd_section should not be NULL in call to prim_record_minimal_* Tom Tromey
2012-04-17 15:17   ` Joel Brobecker
2012-04-17 15:23     ` Tom Tromey
2012-04-17 23:26       ` Joel Brobecker
2012-04-18 15:01         ` Tom Tromey
2012-04-18  0:24   ` Joel Brobecker
2012-04-17 12:45 ` Pedro Alves
2012-04-17 14:21   ` Tom Tromey
2012-04-17 14:29     ` Pedro Alves

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=1334610821-10974-2-git-send-email-brobecker@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@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