This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] stap-probe.c: Add casts
- From: Simon Marchi <simark at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 27 Oct 2015 02:04:58 -0000
- Subject: [binutils-gdb] stap-probe.c: Add casts
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bf6778dab2b3efc5a0ab01ee41e62e966ef08069
commit bf6778dab2b3efc5a0ab01ee41e62e966ef08069
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Mon Oct 26 22:04:10 2015 -0400
stap-probe.c: Add casts
gdb/ChangeLog:
* stap-probe.c (handle_stap_probe): Add (const char *) casts.
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/stap-probe.c | 10 ++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a063a04..568d486 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2015-10-26 Simon Marchi <simon.marchi@polymtl.ca>
+ * stap-probe.c (handle_stap_probe): Add (const char *) casts.
+
+2015-10-26 Simon Marchi <simon.marchi@polymtl.ca>
+
* ctf.c (ctf_xfer_partial): Return TARGET_XFER_E_IO instead of
-1 on error.
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index d88c470..18e0d83 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -1488,8 +1488,9 @@ handle_stap_probe (struct objfile *objfile, struct sdt_note *el,
/* Provider and the name of the probe. */
ret->p.provider = (char *) &el->data[3 * size];
- ret->p.name = memchr (ret->p.provider, '\0',
- (char *) el->data + el->size - ret->p.provider);
+ ret->p.name = ((const char *)
+ memchr (ret->p.provider, '\0',
+ (char *) el->data + el->size - ret->p.provider));
/* Making sure there is a name. */
if (ret->p.name == NULL)
{
@@ -1519,8 +1520,9 @@ handle_stap_probe (struct objfile *objfile, struct sdt_note *el,
/* Arguments. We can only extract the argument format if there is a valid
name for this probe. */
- probe_args = memchr (ret->p.name, '\0',
- (char *) el->data + el->size - ret->p.name);
+ probe_args = ((const char*)
+ memchr (ret->p.name, '\0',
+ (char *) el->data + el->size - ret->p.name));
if (probe_args != NULL)
++probe_args;