[PATCH] syscall.c:788: warning: unused variable ‘pid’

Michal Nowak mnowak at redhat.com
Tue Jan 20 14:28:53 UTC 2009


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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strace-4.5.18-unused-pid.patch
Type: text/x-patch
Size: 1074 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20090120/7a25a552/attachment.bin>


More information about the Strace-devel mailing list