From d5fa6e8c6cb82b03f20dd521f70dcc7fefe573dc Mon Sep 17 00:00:00 2001 From: Enze Li Date: Tue, 26 Sep 2023 20:55:36 +0800 Subject: [PATCH] fbsd-nat: Fix build failure with GCC 12 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 --- 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.30.2