diff options
author | Pedro Alves <palves@redhat.com> | 2013-03-07 18:45:51 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-03-07 18:45:51 +0000 |
commit | fe106009bd9b2b6968256dba016a71e916e211fc (patch) | |
tree | fdf86b8f47b0b9abbe4c3031900ce852b91bd912 /gdb/stap-probe.c | |
parent | 8ac2c12b843ac2f5956bab975a1f855b70fe4fe0 (diff) | |
download | gdb-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/stap-probe.c')
-rw-r--r-- | gdb/stap-probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
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. */ |