diff options
author | Pedro Alves <palves@redhat.com> | 2013-03-07 18:50:48 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-03-07 18:50:48 +0000 |
commit | 9b5e2b6ceb52acc5a61ab5396bfacd06aa9985cd (patch) | |
tree | e3724ff42cb4fa7c0ed64204844fdb16088b41c3 /gdb | |
parent | 7fb6ee6c3b9469b8ae3d869a92597c6f03294511 (diff) | |
download | gdb-9b5e2b6ceb52acc5a61ab5396bfacd06aa9985cd.tar.gz |
breakpoint.c: fix -Wpointer-sign
$ make WERROR_CFLAGS="-Wpointer-sign -Werror" breakpoint.o 2>&1 1>/dev/null
../../src/gdb/breakpoint.c: In function ‘breakpoint_xfer_memory’:
../../src/gdb/breakpoint.c:1578:2: error: pointer targets in passing argument 3 of ‘gdbarch_breakpoint_from_pc’ differ in signedness [-Werror=pointer-sign]
In file included from ../../src/gdb/defs.h:644:0,
from ../../src/gdb/breakpoint.c:20:
../../src/gdb/gdbarch.h:495:25: note: expected ‘int *’ but argument is of type ‘unsigned int *’
target_info.placed_size is an 'int', and gdbarch_breakpoint_from_pc
takes an int too.
gdb/
2013-03-07 Pedro Alves <palves@redhat.com>
* breakpoint.c.c (breakpoint_xfer_memory): Change type of local to
int.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/breakpoint.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index daa4089763a..36e8af356bc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2013-03-07 Pedro Alves <palves@redhat.com> + * breakpoint.c.c (breakpoint_xfer_memory): Change type of local to + int. + +2013-03-07 Pedro Alves <palves@redhat.com> + * stap-probe.c (handle_stap_probe): Add cast to char*. 2013-03-07 Pedro Alves <palves@redhat.com> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index fb57a57d88c..d71bb36cade 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -1567,7 +1567,7 @@ breakpoint_xfer_memory (gdb_byte *readbuf, gdb_byte *writebuf, struct gdbarch *gdbarch = bl->gdbarch; const unsigned char *bp; CORE_ADDR placed_address = bl->target_info.placed_address; - unsigned placed_size = bl->target_info.placed_size; + int placed_size = bl->target_info.placed_size; /* Update the shadow with what we want to write to memory. */ memcpy (bl->target_info.shadow_contents + bptoffset, |