aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTsukasa OI <research_trasio@irq.a4lg.com>2022-09-24 09:25:57 +0000
committerTsukasa OI <research_trasio@irq.a4lg.com>2022-09-30 04:00:53 +0000
commitf3700471469ac0f395961e92892bc5d6e17ca177 (patch)
treeb7a1624ed83e03b552288cd03f3fbc6e5015fe6d
parent511f4ff4d9bcaed1ed53ee64211d7c9f80f07fed (diff)
downloadgdb-f3700471469ac0f395961e92892bc5d6e17ca177.zip
gdb-f3700471469ac0f395961e92892bc5d6e17ca177.tar.gz
gdb-f3700471469ac0f395961e92892bc5d6e17ca177.tar.bz2
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.
-rw-r--r--gdb/xcoffread.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index b7d6577..aa88cbc 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++;
}
}