diff options
author | Nikhil Benesch <nikhil.benesch@gmail.com> | 2020-10-14 19:02:12 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-10-15 13:36:08 -0700 |
commit | f33ac3b0cd9f88be8faadded88e40a511f01c32a (patch) | |
tree | 2bfe6904b72aec7c19c177182fd8966d35f6653a /libgo/runtime | |
parent | 6949fbefe28134744a86c5d7b8d9c17fcf3a16a0 (diff) | |
download | gcc-f33ac3b0cd9f88be8faadded88e40a511f01c32a.zip gcc-f33ac3b0cd9f88be8faadded88e40a511f01c32a.tar.gz gcc-f33ac3b0cd9f88be8faadded88e40a511f01c32a.tar.bz2 |
runtime: use correct types in __go_ptrace shim
Make the types of the addr and data arguments in the __go_ptrace shim
match the types declared in Go and the types declared by the C ptrace
function, i.e., void*. This avoids a warning about an implicit
int-to-pointer cast on some platforms.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/262340
Diffstat (limited to 'libgo/runtime')
-rw-r--r-- | libgo/runtime/go-varargs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/runtime/go-varargs.c b/libgo/runtime/go-varargs.c index 9cb4a7e..d8f7dc5 100644 --- a/libgo/runtime/go-varargs.c +++ b/libgo/runtime/go-varargs.c @@ -122,7 +122,7 @@ __go_syscall6(uintptr_t flag, uintptr_t a1, uintptr_t a2, uintptr_t a3, // a variadic function within glibc. long -__go_ptrace(int request, pid_t pid, uintptr_t addr, uintptr_t data) +__go_ptrace(int request, pid_t pid, void *addr, void *data) { return ptrace (request, pid, addr, data); } |