aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-10-05 07:28:16 -0600
committerTom Tromey <tom@tromey.com>2018-10-05 10:38:01 -0600
commitf8740dc531c006311ee9f7287180550fe46a94ab (patch)
treeecdbe9b0d10c6a8a924fa3187ff9f0ccee83c53b
parentd1c86cff1ecdd1027bd224d38f2161196e9955fa (diff)
downloadgdb-f8740dc531c006311ee9f7287180550fe46a94ab.zip
gdb-f8740dc531c006311ee9f7287180550fe46a94ab.tar.gz
gdb-f8740dc531c006311ee9f7287180550fe46a94ab.tar.bz2
Fix -Wshadow=local warning in sol_thread_target::wait
Rainer pointed out that -Wshadow=local broke the Solaris build. This fixes it. gdb/ChangeLog 2018-10-05 Tom Tromey <tom@tromey.com> * sol-thread.c (sol_thread_target::wait): Rename inner "save_ptid".
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/sol-thread.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 912bdec..a533ffd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-05 Tom Tromey <tom@tromey.com>
+
+ * sol-thread.c (sol_thread_target::wait): Rename inner
+ "save_ptid".
+
2018-10-04 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 5cdc9a8..682302a 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -440,14 +440,14 @@ sol_thread_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
if (ptid.pid () != -1)
{
- ptid_t save_ptid = ptid;
+ ptid_t ptid_for_warning = ptid;
ptid = thread_to_lwp (ptid, -2);
if (ptid.pid () == -2) /* Inactive thread. */
error (_("This version of Solaris can't start inactive threads."));
if (info_verbose && ptid.pid () == -1)
warning (_("Specified thread %ld seems to have terminated"),
- save_ptid.tid ());
+ ptid_for_warning.tid ());
}
rtnval = beneath ()->wait (ptid, ourstatus, options);