public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tsukasa OI <a4lg@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] gdb: Remove unused extra_lines variable
Date: Fri, 30 Sep 2022 04:01:18 +0000 (GMT)	[thread overview]
Message-ID: <20220930040118.B80783858D1E@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f3700471469ac0f395961e92892bc5d6e17ca177

commit f3700471469ac0f395961e92892bc5d6e17ca177
Author: Tsukasa OI <research_trasio@irq.a4lg.com>
Date:   Sat Sep 24 09:25:57 2022 +0000

    gdb: Remove unused extra_lines variable
    
    Clang generates a warning if there is a variable that is set but not used
    otherwise ("-Wunused-but-set-variable").  On the default configuration, it
    causes a build failure (unless "--disable-werror" is specified).
    
    The only extra_lines use in arrange_linetable function is removed on the
    commit 558802e4d1c5dcbd0df7d2c6ef62a6deac247a2f
    ("gdb: change subfile::line_vector to an std::vector").  So, this variable
    should be removed to prevent a build failure.

Diff:
---
 gdb/xcoffread.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index b7d65771115..aa88cbc724d 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -419,8 +419,6 @@ add_stab_to_list (char *stabname, struct pending_stabs **stabvector)
 static void
 arrange_linetable (std::vector<linetable_entry> &old_linetable)
 {
-  int extra_lines = 0;
-
   std::vector<linetable_entry> fentries;
 
   for (int ii = 0; ii < old_linetable.size (); ++ii)
@@ -436,12 +434,6 @@ arrange_linetable (std::vector<linetable_entry> &old_linetable)
 	  e.line = ii;
 	  e.is_stmt = 1;
 	  e.pc = old_linetable[ii].pc;
-
-	  /* If the function was compiled with XLC, we may have to add an
-	     extra line entry later.  Reserve space for that.  */
-	  if (ii + 1 < old_linetable.size ()
-	      && old_linetable[ii].pc != old_linetable[ii + 1].pc)
-	    extra_lines++;
 	}
     }

                 reply	other threads:[~2022-09-30  4:01 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=20220930040118.B80783858D1E@sourceware.org \
    --to=a4lg@sourceware.org \
    --cc=gdb-cvs@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).