corefile.c: fix -Wpointer-sign
authorPedro Alves <palves@redhat.com>
Thu, 7 Mar 2013 23:36:01 +0000 (23:36 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 7 Mar 2013 23:36:01 +0000 (23:36 +0000)
commitc8af03a2f5d51f4c2de96ad9b6431553f0208f5c
tree47c0b581b061ae06a5cb2db60e1b181bf58a3cb6
parent4bead2d512271ca2a0dee6172042558795b134cc
corefile.c: fix -Wpointer-sign

$ make WERROR_CFLAGS="-Wpointer-sign -Werror" corefile.o -k 2>&1 1>/dev/null
../../src/gdb/corefile.c: In function ‘read_memory_string’:
../../src/gdb/corefile.c:334:7: error: pointer targets in passing argument 2 of ‘read_memory’ differ in signedness [-Werror=pointer-sign]
../../src/gdb/corefile.c:217:1: note: expected ‘gdb_byte *’ but argument is of type ‘char *’

Functions that take or return ascii-ish string arguments usually use
char* for parameters/return.  That means that at points we call into
target methods that work with binary blobs, we need casts to
gdb_byte*.

gdb/
2013-03-07  Pedro Alves  <palves@redhat.com>

* corefile.c (read_memory_string): Cast pointer to gdb_byte* in
call.
gdb/ChangeLog
gdb/corefile.c