The common defs.h code sets up a fallback ptrace() for many arches which
declares the 4th arg as "long" which results in warnings like so:
util.c: In function ‘do_ptrace’:
util.c:260: warning: passing argument 4 of ‘ptrace’ makes integer from 
pointer without a cast
util.c: In function ‘ptrace_restart’:
util.c:282: warning: passing argument 4 of ‘ptrace’ makes integer from 
pointer without a cast

* util.c (do_ptrace): Cast 4th arg to long.
(ptrace_restart): Drop void* cast on 4th arg.

Signed-off-by: Mike Frysinger <[email protected]>
---
 util.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/util.c b/util.c
index c767065..c96eb0a 100644
--- a/util.c
+++ b/util.c
@@ -257,7 +257,7 @@ do_ptrace(int request, struct tcb *tcp, void *addr, void 
*data)
        long l;
 
        errno = 0;
-       l = ptrace(request, tcp->pid, addr, data);
+       l = ptrace(request, tcp->pid, addr, (long) data);
        /* Non-ESRCH errors might be our invalid reg/mem accesses,
         * we do not record them. */
        if (errno == ESRCH)
@@ -279,7 +279,7 @@ ptrace_restart(int op, struct tcb *tcp, int sig)
        const char *msg;
 
        errno = 0;
-       ptrace(op, tcp->pid, (void *) 1, (void *) (long) sig);
+       ptrace(op, tcp->pid, (void *) 1, (long) sig);
        err = errno;
        if (!err || err == ESRCH)
                return 0;
-- 
1.6.5.rc2


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to