From patchwork Mon Oct 26 03:46:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 9370 Received: (qmail 15821 invoked by alias); 26 Oct 2015 03:47:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 15731 invoked by uid 89); 26 Oct 2015 03:47:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL, BAYES_00, SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtp.electronicbox.net Received: from smtp.electronicbox.net (HELO smtp.electronicbox.net) (96.127.255.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Oct 2015 03:47:16 +0000 Received: from simark.lan. (cable-192.222.137.139.electronicbox.net [192.222.137.139]) by smtp.electronicbox.net (Postfix) with ESMTP id 67F80440E87; Sun, 25 Oct 2015 23:47:14 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH c++ 09/12] stap-probe.c: Add casts Date: Sun, 25 Oct 2015 23:46:41 -0400 Message-Id: <1445831204-16588-9-git-send-email-simon.marchi@polymtl.ca> In-Reply-To: <1445831204-16588-1-git-send-email-simon.marchi@polymtl.ca> References: <1445831204-16588-1-git-send-email-simon.marchi@polymtl.ca> gdb/ChangeLog: * stap-probe.c (handle_stap_probe): Add (const char *) casts. --- gdb/stap-probe.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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;