public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] fbsd-nat: Fix build failure with GCC 12
@ 2023-09-26 13:20 Enze Li
  2023-09-26 15:58 ` John Baldwin
  0 siblings, 1 reply; 2+ messages in thread
From: Enze Li @ 2023-09-26 13:20 UTC (permalink / raw)
  To: gdb-patches; +Cc: John Baldwin

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pushed] fbsd-nat: Fix build failure with GCC 12
  2023-09-26 13:20 [pushed] fbsd-nat: Fix build failure with GCC 12 Enze Li
@ 2023-09-26 15:58 ` John Baldwin
  0 siblings, 0 replies; 2+ messages in thread
From: John Baldwin @ 2023-09-26 15:58 UTC (permalink / raw)
  To: Enze Li, gdb-patches

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-26 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-26 13:20 [pushed] fbsd-nat: Fix build failure with GCC 12 Enze Li
2023-09-26 15:58 ` John Baldwin

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).