diff options
author | Yao Qi <yao@codesourcery.com> | 2014-02-07 14:35:09 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-02-17 11:25:42 +0800 |
commit | 25c0bd040bc22fcb2fc3ec440ace2552ca030a7f (patch) | |
tree | 44c32ebdc4724799ba4950e83fc1f8e17febfc3d /gdb | |
parent | a9a758e3ee008b76613350cfc71b44dbe2167180 (diff) | |
download | gdb-25c0bd040bc22fcb2fc3ec440ace2552ca030a7f.zip gdb-25c0bd040bc22fcb2fc3ec440ace2552ca030a7f.tar.gz gdb-25c0bd040bc22fcb2fc3ec440ace2552ca030a7f.tar.bz2 |
Fix -Werror=pointer-sign warnings
../../../git/gdb/gnu-nat.c: In function 'gnu_read_inferior':
../../../git/gdb/gnu-nat.c:2282:3: error: pointer targets in passing argument 5 of 'vm_read' differ in signedness [-Werror=pointer-sign]
In file included from /home/yao/Software/hurd-toolchain/bin/../i686-pc-gnu/libc/usr/include/mach.h:38:0,
from ./nm.h:23,
from ../../../git/gdb/defs.h:500,
from ../../../git/gdb/gnu-nat.c:23:
/home/yao/Software/hurd-toolchain/bin/../i686-pc-gnu/libc/usr/include/mach/mach_interface.h:843:15: note: expected 'mach_msg_type_number_t *' but argument is of type 'int *'
../../../git/gdb/gnu-nat.c: In function 'gnu_write_inferior':
../../../git/gdb/gnu-nat.c:2339:4: error: pointer targets in passing argument 5 of 'vm_read' differ in signedness [-Werror=pointer-sign]
In file included from /home/yao/Software/hurd-toolchain/bin/../i686-pc-gnu/libc/usr/include/mach.h:38:0,
from ./nm.h:23,
from ../../../git/gdb/defs.h:500,
from ../../../git/gdb/gnu-nat.c:23:
/home/yao/Software/hurd-toolchain/bin/../i686-pc-gnu/libc/usr/include/mach/mach_interface.h:843:15: note: expected 'mach_msg_type_number_t *' but argument is of type 'int *'
This patch fixes these warnings.
gdb:
2014-02-17 Yao Qi <yao@codesourcery.com>
* gnu-nat.c (gnu_read_inferior): Change 'copy_count' type to
mach_msg_type_number_t.
(gnu_write_inferior): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gnu-nat.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d972e16..b28201e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2014-02-17 Yao Qi <yao@codesourcery.com> + * gnu-nat.c (gnu_read_inferior): Change 'copy_count' type to + mach_msg_type_number_t. + (gnu_write_inferior): Likewise. + +2014-02-17 Yao Qi <yao@codesourcery.com> + * gnu-nat.c (proc_get_exception_port): Use 'lu' insetad of 'd' in format string. (proc_steal_exc_port, make_proc, inf_set_pid): Likewise. diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 545105f..e4140e0 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -2288,7 +2288,7 @@ gnu_read_inferior (task_t task, CORE_ADDR addr, gdb_byte *myaddr, int length) vm_size_t aligned_length = (vm_size_t) round_page (addr + length) - low_address; pointer_t copied; - int copy_count; + mach_msg_type_number_t copy_count; /* Get memory from inferior with page aligned addresses. */ err = vm_read (task, low_address, aligned_length, &copied, ©_count); @@ -2335,7 +2335,7 @@ gnu_write_inferior (task_t task, CORE_ADDR addr, vm_size_t aligned_length = (vm_size_t) round_page (addr + length) - low_address; pointer_t copied; - int copy_count; + mach_msg_type_number_t copy_count; int deallocate = 0; char *errstr = "Bug in gnu_write_inferior"; |