diff options
author | Pedro Alves <palves@redhat.com> | 2013-04-19 15:28:42 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-04-19 15:28:42 +0000 |
commit | 5e50ec2db34555434bdf0c61996647573945f047 (patch) | |
tree | 0bb69286f98e2c997e8dcb030e08b73bfedae510 /sim/m32c | |
parent | 34bcb4e371534d9a450ea11a578adff28704fa23 (diff) | |
download | gdb-5e50ec2db34555434bdf0c61996647573945f047.tar.gz |
-Wpointer-sign: remote-mips.c.
remote-mips.c has a bunch of -Wpointer-sign warnings:
../../src/gdb/remote-mips.c: In function ‘mips_receive_packet’:
../../src/gdb/remote-mips.c:1128:7: error: pointer targets in passing argument 2 of ‘mips_cksum’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:830:1: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
../../src/gdb/remote-mips.c:1135:7: error: pointer targets in passing argument 2 of ‘mips_cksum’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:830:1: note: expected ‘const unsigned char *’ but argument is of type ‘char *’
../../src/gdb/remote-mips.c: In function ‘mips_load_srec’:
../../src/gdb/remote-mips.c:2830:12: error: pointer targets in passing argument 4 of ‘mips_make_srec’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:134:12: note: expected ‘unsigned char *’ but argument is of type ‘char *’
../../src/gdb/remote-mips.c: In function ‘pmon_zeroset’:
../../src/gdb/remote-mips.c:3030:3: error: pointer targets in passing argument 4 of ‘pmon_makeb64’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:2977:1: note: expected ‘int *’ but argument is of type ‘unsigned int *’
../../src/gdb/remote-mips.c: In function ‘pmon_make_fastrec’:
../../src/gdb/remote-mips.c:3124:6: error: pointer targets in passing argument 3 of ‘pmon_zeroset’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:3025:1: note: expected ‘int *’ but argument is of type ‘unsigned int *’
../../src/gdb/remote-mips.c:3126:4: error: pointer targets in passing argument 4 of ‘pmon_makeb64’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:2977:1: note: expected ‘int *’ but argument is of type ‘unsigned int *’
../../src/gdb/remote-mips.c:3148:3: error: pointer targets in passing argument 3 of ‘pmon_zeroset’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:3025:1: note: expected ‘int *’ but argument is of type ‘unsigned int *’
../../src/gdb/remote-mips.c:3153:3: error: pointer targets in passing argument 3 of ‘pmon_zeroset’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:3025:1: note: expected ‘int *’ but argument is of type ‘unsigned int *’
../../src/gdb/remote-mips.c:3154:8: error: pointer targets in passing argument 4 of ‘pmon_makeb64’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:2977:1: note: expected ‘int *’ but argument is of type ‘unsigned int *’
../../src/gdb/remote-mips.c: In function ‘pmon_load_fast’:
../../src/gdb/remote-mips.c:3423:2: error: pointer targets in passing argument 4 of ‘pmon_makeb64’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:2977:1: note: expected ‘int *’ but argument is of type ‘unsigned int *’
../../src/gdb/remote-mips.c:3457:4: error: pointer targets in passing argument 3 of ‘pmon_checkset’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:3051:1: note: expected ‘int *’ but argument is of type ‘unsigned int *’
../../src/gdb/remote-mips.c:3484:8: error: pointer targets in passing argument 3 of ‘pmon_zeroset’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:3025:1: note: expected ‘int *’ but argument is of type ‘unsigned int *’
../../src/gdb/remote-mips.c:3489:3: error: pointer targets in passing argument 3 of ‘pmon_checkset’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/remote-mips.c:3051:1: note: expected ‘int *’ but argument is of type ‘unsigned int *’
The mips packet payload is ASCII, so it makes sense for
mips_send_packet and mips_receive_packet to expose 'char *'-based
interfaces, as currently they do. But, mips packets have a binary
header, so if you look at e.g., mips_receive_packet's implementation,
you'll see "unsigned char" buffers in use. I find it the most natural
to make the payload pointer passed to mips_cksum 'char *' too.
The other changes are straightforward adjustments -- a checksum is
naturally unsigned, and there's one point where we're reading a bfd section.
gdb/
2013-04-19 Pedro Alves <palves@redhat.com>
* remote-mips.c (mips_cksum): Rename 'data' parameter to 'datastr'
and change its type to 'const char *'. Adjust.
(mips_send_packet): Add cast to 'char *', and remove cast to
'unsigned char *'.
(mips_receive_packet): Remove cast to 'unsigned char *'.
(mips_load_srec): Use bfd_byte.
(pmon_makeb64, pmon_zeroset): Make 'chksum' parameter unsigned.
(pmon_checkset): Make 'value' parameter unsigned.
Diffstat (limited to 'sim/m32c')
0 files changed, 0 insertions, 0 deletions