aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-03-07 18:45:51 +0000
committerPedro Alves <palves@redhat.com>2013-03-07 18:45:51 +0000
commitfe106009bd9b2b6968256dba016a71e916e211fc (patch)
treefdf86b8f47b0b9abbe4c3031900ce852b91bd912 /gdb
parent8ac2c12b843ac2f5956bab975a1f855b70fe4fe0 (diff)
downloadgdb-fe106009bd9b2b6968256dba016a71e916e211fc.zip
gdb-fe106009bd9b2b6968256dba016a71e916e211fc.tar.gz
gdb-fe106009bd9b2b6968256dba016a71e916e211fc.tar.bz2
stap-probe.c: fix -Wpointer-sign
$ make WERROR_CFLAGS="-Wpointer-sign -Werror" stap-probe.o 2>&1 1>/dev/null ../../src/gdb/stap-probe.c: In function ‘handle_stap_probe’: ../../src/gdb/stap-probe.c:1306:19: error: pointer targets in assignment differ in signedness [-Werror=pointer-sign] cc1: all warnings being treated as errors make: *** [stap-probe.o] Error 1 provider is a string, so it's rightfully a char*. 'data' holds raw bytes (bfd_byte), so a cast is the right thing to do. gdb/ 2013-03-07 Pedro Alves <palves@redhat.com> * stap-probe.c (handle_stap_probe): Add cast to char*.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/stap-probe.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3b78b08..daa4089 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
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>
+
* linux-record.c (record_linux_system_call) <gdb_sys_msgrcv,
RECORD_MSGRCV>: Pass a signed variable to
regcache_raw_read_signed, instead of an unsigned one.
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index 7326a5c..9b67304 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -1303,7 +1303,7 @@ handle_stap_probe (struct objfile *objfile, struct sdt_note *el,
ret->p.objfile = objfile;
/* Provider and the name of the probe. */
- ret->p.provider = &el->data[3 * size];
+ ret->p.provider = (char *) &el->data[3 * size];
ret->p.name = memchr (ret->p.provider, '\0',
(char *) el->data + el->size - ret->p.provider);
/* Making sure there is a name. */