public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: Enze Li <enze.li@hotmail.com>, gdb-patches@sourceware.org
Subject: Re: [pushed] fbsd-nat: Fix build failure with GCC 12
Date: Tue, 26 Sep 2023 08:58:56 -0700	[thread overview]
Message-ID: <4e999754-d4cd-3a5f-8fc7-76559dcaa2cf@FreeBSD.org> (raw)
In-Reply-To: <OS3P286MB21524C02409456C2B954D41AF0C3A@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM>

On 9/26/23 2:20 PM, Enze Li wrote:
> 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;

Thanks, but odd as I had fixed that locally and thought I had pushed that
version with this fix. :-/  Not sure why I pushed the old version.

-- 
John Baldwin


      reply	other threads:[~2023-09-26 15:58 UTC|newest]

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

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=4e999754-d4cd-3a5f-8fc7-76559dcaa2cf@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=enze.li@hotmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).