From 1e5a4f05ffbfefb4e5e1392b72abb5c5a3f186c0 Mon Sep 17 00:00:00 2001 From: nevun Date: Mon, 9 Jan 2017 13:47:24 +0100 Subject: [PATCH] Silence warning on OpenBSD by casting to caddr_t. (#6453) Gets rid of this: p/debug_native.c: In function 'bsd_reg_read': p/debug_native.c:674: warning: passing argument 3 of 'ptrace' from incompatible pointer type --- libr/debug/p/debug_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libr/debug/p/debug_native.c b/libr/debug/p/debug_native.c index 2b026ee8c5..560b9684ad 100755 --- a/libr/debug/p/debug_native.c +++ b/libr/debug/p/debug_native.c @@ -671,7 +671,7 @@ static int bsd_reg_read (RDebug *dbg, int type, ut8* buf, int size) { memset (®s, 0, sizeof(regs)); memset (buf, 0, size); #if __NetBSD__ || __OpenBSD__ - ret = ptrace (PTRACE_GETREGS, pid, ®s, sizeof (regs)); + ret = ptrace (PTRACE_GETREGS, pid, (caddr_t)®s, sizeof (regs)); #elif __KFBSD__ ret = ptrace(PT_GETREGS, pid, (caddr_t)®s, 0); #else