[binutils-gdb] fbsd-nat: Fix build failure with GCC 12
Enze Li
lienze@sourceware.org
Tue Sep 26 13:19:38 GMT 2023
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d5fa6e8c6cb82b03f20dd521f70dcc7fefe573dc
commit d5fa6e8c6cb82b03f20dd521f70dcc7fefe573dc
Author: Enze Li <enze.li@hotmail.com>
Date: Tue Sep 26 20:55:36 2023 +0800
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 <jhb@FreeBSD.org>
Diff:
---
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;
More information about the Gdb-cvs
mailing list