diff options
author | Pedro Alves <palves@redhat.com> | 2016-04-20 21:42:57 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-04-20 21:42:57 +0100 |
commit | 597e448caf30996be7e4583847da720f8021b20c (patch) | |
tree | 24335bf6f590649f9ef056c0cb1540427100e87f /gdb/darwin-nat.c | |
parent | c7ce9410351ea64fb4c250ceb6ed796090ae49d9 (diff) | |
download | gdb-597e448caf30996be7e4583847da720f8021b20c.zip gdb-597e448caf30996be7e4583847da720f8021b20c.tar.gz gdb-597e448caf30996be7e4583847da720f8021b20c.tar.bz2 |
gdb/darwin-nat.c: Fix "cast to pointer from integer of different size" warning
Fixes, with gcc 5.3.0:
.../src/gdb/darwin-nat.c: In function 'void darwin_resume_thread(inferior*, darwin_thread_t*, int, int)':
.../src/gdb/darwin-nat.c:731:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(caddr_t)thread->gdb_port, nsignal);
^
.../src/gdb/darwin-nat.c:84:35: note: in definition of macro 'PTRACE'
darwin_ptrace(#CMD, CMD, (PID), (ADDR), (SIG))
^
thread->gdb_port is an unsigned int, caddr_t is a void pointer.
gdb/ChangeLog:
2016-04-20 Pedro Alves <palves@redhat.com>
* darwin-nat.c (darwin_resume_thread): Add uintptr_t cast.
Diffstat (limited to 'gdb/darwin-nat.c')
-rw-r--r-- | gdb/darwin-nat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c index 082a056..16294b2 100644 --- a/gdb/darwin-nat.c +++ b/gdb/darwin-nat.c @@ -728,7 +728,7 @@ darwin_resume_thread (struct inferior *inf, darwin_thread_t *thread, { /* Either deliver a new signal or cancel the signal received. */ res = PTRACE (PT_THUPDATE, inf->pid, - (caddr_t)thread->gdb_port, nsignal); + (caddr_t) (uintptr_t) thread->gdb_port, nsignal); if (res < 0) inferior_debug (1, _("ptrace THUP: res=%d\n"), res); } |