From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH 2/3] Fix -Werror=pointer-sign warnings
Date: Fri, 07 Feb 2014 08:01:00 -0000 [thread overview]
Message-ID: <1391759958-972-3-git-send-email-yao@codesourcery.com> (raw)
In-Reply-To: <1391759958-972-1-git-send-email-yao@codesourcery.com>
../../../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-07 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.
---
gdb/gnu-nat.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 6e65446..d5ce416 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -2276,7 +2276,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);
@@ -2323,7 +2323,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";
--
1.7.7.6
next prev parent reply other threads:[~2014-02-07 8:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 8:01 [PATCH 0/3] Unbreak build on hurd Yao Qi
2014-02-07 8:01 ` [PATCH 1/3 OBV] Fix -Wformat warnings in gnu-nat.c Yao Qi
2014-02-16 7:38 ` Thomas Schwinge
2014-02-17 3:32 ` Yao Qi
2014-02-07 8:01 ` Yao Qi [this message]
2014-02-07 11:42 ` [PATCH 2/3] Fix -Werror=pointer-sign warnings Joel Brobecker
2014-02-16 7:39 ` Thomas Schwinge
2014-02-17 3:32 ` Yao Qi
2014-02-07 8:01 ` [PATCH 3/3] Find and link with -lmachuser -lhurduser Yao Qi
2014-02-16 7:49 ` Thomas Schwinge
2014-02-17 2:17 ` Yao Qi
2014-02-25 5:10 ` Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1391759958-972-3-git-send-email-yao@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox