public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Enze Li <enze.li@hotmail.com>
To: gdb-patches@sourceware.org
Cc: John Baldwin <jhb@FreeBSD.org>
Subject: [pushed] fbsd-nat: Fix build failure with GCC 12
Date: Tue, 26 Sep 2023 21:20:13 +0800	[thread overview]
Message-ID: <OS3P286MB21524C02409456C2B954D41AF0C3A@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM> (raw)

A user pointed out that the build failed on FreeBSD/amd64 with my last
commit.  The problem is that I'm not using the proper way to tell the
compiler that the variable has been "used".  This patch fixes this issue
as suggested by John.  Pushed as obvious.

Tested both on FreeBSD/amd64 and FreeBSD/aarch64 by rebuilding.

Suggested-By: John Baldwin <jhb@FreeBSD.org>
---
 gdb/fbsd-nat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c
index 81a77b3a60f..55a36f24025 100644
--- a/gdb/fbsd-nat.c
+++ b/gdb/fbsd-nat.c
@@ -2094,7 +2094,7 @@ fbsd_nat_target::detach (inferior *inf, int from_tty)
 		  }
 #else
 		  /* pacify gcc  */
-		  wptid = (void) null_ptid;
+		  (void) wptid;
 #endif
 		  sig = 0;
 		  break;
-- 
2.42.0


             reply	other threads:[~2023-09-26 13:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 13:20 Enze Li [this message]
2023-09-26 15:58 ` John Baldwin

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=OS3P286MB21524C02409456C2B954D41AF0C3A@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM \
    --to=enze.li@hotmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.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).