From: Pedro Alves Date: Thu, 7 Mar 2013 18:45:51 +0000 (+0000) Subject: stap-probe.c: fix -Wpointer-sign X-Git-Tag: gdb_7_6-branchpoint~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe106009bd9b2b6968256dba016a71e916e211fc;p=thirdparty%2Fbinutils-gdb.git 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 * stap-probe.c (handle_stap_probe): Add cast to char*. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3b78b087ee6..daa4089763a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-03-07 Pedro Alves + + * stap-probe.c (handle_stap_probe): Add cast to char*. + 2013-03-07 Pedro Alves * linux-record.c (record_linux_system_call) 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. */