Hi.
On i386 building strace from CVS emits following warning:
if gcc -DHAVE_CONFIG_H -I. -I. -I. -Ilinux/i386 -I./linux/i386 -Ilinux
-I./linux -Wall -g -O2 -MT syscall.o -MD -MP -MF ".deps/syscall.Tpo" -c -o
syscall.o syscall.c; \
then mv -f ".deps/syscall.Tpo" ".deps/syscall.Po"; else rm -f
".deps/syscall.Tpo"; exit 1; fi
syscall.c: In function ‘get_scno’:
syscall.c:788: warning: unused variable ‘pid’
Attached patch fixes it by disabling [1] for archs, which don't
actually use it. I successfully tested/compiled it on i386 and
IA-64.
Michal
[1] syscall.c: 788 int pid = tcp->pid;--- syscall.c 2009-01-17 02:06:18.000000000 +0100
+++ syscall.c 2009-01-20 15:01:37.000000000 +0100
@@ -785,8 +785,14 @@ struct tcb *tcp;
{
long scno = 0;
#ifndef USE_PROCFS
+#if defined(S390) || defined(S390X) || defined(X86_64) || defined(ARM) \
+ || defined(LINUX_MIPSN32) || defined(LINUX_MIPSN64) || defined(SPARC) \
+ || defined(SPARC64) || (defined(IA64) && defined(PTRACE_GETSIGINFO))
int pid = tcp->pid;
-#endif /* !PROCFS */
+#endif /*
+ S390 || S390X || X86_64 || ARM || LINUX_MIPSN32 || LINUX_MIPSN64
+ || SPARC || SPARC64 || (IA64 && PTRACE_GETSIGINFO) */
+#endif /* !USE_PROCFS */
#ifdef LINUX
#if defined(S390) || defined(S390X)
--- ChangeLog 2009-01-20 15:05:20.000000000 +0100
+++ ChangeLog 2009-01-20 15:06:46.000000000 +0100
@@ -1,3 +1,8 @@
+2009-01-20 Michal Nowak <[email protected]>
+
+ * syscall.c: Wrap the pid varible with defines so it builds without
+ warning on i386 and possibly other architectures
+
2009-01-17 Denys Vlasenko <[email protected]>
Two cleanups: tcb table expansion failure is not really a survivable
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel