public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [pushed] Remove two unnecessary casts
Date: Tue, 13 Dec 2022 08:59:54 -0700	[thread overview]
Message-ID: <20221213155954.1526593-1-tromey@adacore.com> (raw)

A couple of calls to parse_probe_linespec had an unnecessary cast.  I
suspect this cast was never needed, but once commands were changed to
take a 'const' argument, they became completely obsolete.  Tested by
rebuilding.
---
 gdb/probe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/probe.c b/gdb/probe.c
index ec8845219fa..4193f9f936b 100644
--- a/gdb/probe.c
+++ b/gdb/probe.c
@@ -617,7 +617,7 @@ enable_probes_command (const char *arg, int from_tty)
 {
   std::string provider, probe_name, objname;
 
-  parse_probe_linespec ((const char *) arg, &provider, &probe_name, &objname);
+  parse_probe_linespec (arg, &provider, &probe_name, &objname);
 
   std::vector<bound_probe> probes
     = collect_probes (objname, provider, probe_name, &any_static_probe_ops);
@@ -652,7 +652,7 @@ disable_probes_command (const char *arg, int from_tty)
 {
   std::string provider, probe_name, objname;
 
-  parse_probe_linespec ((const char *) arg, &provider, &probe_name, &objname);
+  parse_probe_linespec (arg, &provider, &probe_name, &objname);
 
   std::vector<bound_probe> probes
     = collect_probes (objname, provider, probe_name, &any_static_probe_ops);
-- 
2.34.3


             reply	other threads:[~2022-12-13 16:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 15:59 Tom Tromey [this message]
2024-02-26 20:52 Tom Tromey
2024-02-27 23:17 ` John Baldwin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221213155954.1526593-1-tromey@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).