Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [pushed 3/4] gdb/aix-thread: remove unused priv variables
Date: Tue, 24 Nov 2026 11:38:55 -0500	[thread overview]
Message-ID: <20261124163901.185016-3-simon.marchi@efficios.com> (raw)
In-Reply-To: <20261124163901.185016-1-simon.marchi@efficios.com>

Building aix-thread.c on AIX fails with:

    ../../../src/binutils-gdb/gdb/aix-thread.c:1108:24: error: unused variable 'priv' [-Werror=unused-variable]
    ../../../src/binutils-gdb/gdb/aix-thread.c:2029:24: error: unused variable 'priv' [-Werror=unused-variable]

Remove them.  In aix_thread_target::pid_to_str, also remove the braces
that are now unnecessary.

Change-Id: Ie5820009a66332e20d583e5dec1a0f753b8d2723
---
 gdb/aix-thread.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 8823b36509f2..8f2c626c1641 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -1105,8 +1105,6 @@ aix_thread_target::resume (ptid_t ptid, int step, enum gdb_signal sig)
 	error (_("aix-thread resume: unknown pthread %ld"),
 	       ptid.lwp ());
 
-      aix_thread_info *priv = get_aix_thread_info (thread);
-
       tid[0] = ptid.lwp ();
       if (tid[0] == PTHDB_INVALID_TID)
 	error (_("aix-thread resume: no tid for pthread %ld"),
@@ -2025,12 +2023,8 @@ aix_thread_target::pid_to_str (ptid_t ptid)
   thread_info *thread_info = current_inferior ()->find_thread (ptid);
 
   if (thread_info != NULL && thread_info->priv != NULL)
-    {
-      aix_thread_info *priv = get_aix_thread_info (thread_info);
-
-      return string_printf (_("Thread %s (tid %s)"), pulongest (ptid.tid ()),
-			    pulongest (ptid.lwp ()));
-    }
+    return string_printf (_("Thread %s (tid %s)"), pulongest (ptid.tid ()),
+			  pulongest (ptid.lwp ()));
 
   return beneath ()->pid_to_str (ptid);
 }
-- 
2.56.1


  parent reply	other threads:[~2026-11-24 16:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 16:38 [pushed 1/4] gdb/aix-thread: make state2str return const char * Simon Marchi
2026-11-24 16:38 ` [pushed 2/4] gdb/aix-thread: rename lambda parameter in pd_update Simon Marchi
2026-11-24 16:38 ` Simon Marchi [this message]
2026-11-24 16:38 ` [pushed 4/4] gdb/aix-thread: fix misleading indentation in store_regs_user_thread Simon Marchi

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=20261124163901.185016-3-simon.marchi@efficios.com \
    --to=simon.marchi@efficios.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