[Bug 16734] get_ptrace_tid defined but not used on GNU Hurd/OpenBSD/NetBSD
wine-bugs at winehq.org
wine-bugs at winehq.org
Thu Nov 13 13:23:16 CST 2014
https://bugs.winehq.org/show_bug.cgi?id=16734
André H. <nerv at dawncrow.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nerv at dawncrow.de
--- Comment #10 from André H. <nerv at dawncrow.de> ---
(In reply to Austin English from comment #0)
> ccache gcc -c -I. -I. -I../include -I../include -D__WINESRC__ -Wall -pipe
> -fno-strict-aliasing -Wwrite-strings -Wpointer-arith -I/usr/local/include -g
> -O2 -o ptrace.o ptrace.c
> ptrace.c:174: warning: `get_ptrace_tid' defined but not used
>
> There's an '#ifdef linux' on the same code a few lines earlier (in
> get_ptrace_tid), which fixes compile here as well:
>
> diff --git a/server/ptrace.c b/server/ptrace.c
> index b446de9..92b7db5 100644
> --- a/server/ptrace.c
> +++ b/server/ptrace.c
> @@ -172,7 +172,9 @@ static int get_ptrace_pid( struct thread *thread )
> /* return the Unix tid to use in ptrace calls for a given thread */
> static int get_ptrace_tid( struct thread *thread )
> {
> +#ifdef linux
> if (thread->unix_tid != -1) return thread->unix_tid;
> +#endif
> return thread->unix_pid;
> }
>
> but I'm not sure if that's right or not. Comments welcome.
sorry, this is wrong, and i don't know how this would remove the warning.
Checking for the complicated cases when it's used is also a bad idea.
so i suggest: https://source.winehq.org/patches/data/107662
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list