https://bugs.winehq.org/show_bug.cgi?id=16734
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
--- Comment #10 from André H. nerv@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