aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2016-09-08 09:49:07 -0600
committerTom Tromey <tom@tromey.com>2016-09-08 09:50:28 -0600
commitf5c4fcd9712f516e2b5cfb8ad2464f0d5dfcc61b (patch)
tree3d55540a50441faf2f18cec3bcb36d2b5a7f53f8
parent8d471ec1e73eea3ff8ff6954283f8f16e7a7bc84 (diff)
downloadgdb-f5c4fcd9712f516e2b5cfb8ad2464f0d5dfcc61b.zip
gdb-f5c4fcd9712f516e2b5cfb8ad2464f0d5dfcc61b.tar.gz
gdb-f5c4fcd9712f516e2b5cfb8ad2464f0d5dfcc61b.tar.bz2
Remove some unneeded casts from remote.c
I happened to notice a few unneeded casts in remote.c. In some cases these are no-ops, and in others these cast away const, but in a context where this is not needed. I'm checking this in under the obvious rule. Tested by rebuilding on x86-64 Fedora 24. 2016-09-08 Tom Tromey <tom@tromey.com> * remote.c (remote_notif_stop_ack, remote_wait_as) (show_remote_cmd): Remove unneeded casts.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/remote.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 108528d..e7cc712 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2016-09-08 Tom Tromey <tom@tromey.com>
+
+ * remote.c (remote_notif_stop_ack, remote_wait_as)
+ (show_remote_cmd): Remove unneeded casts.
+
2016-09-06 Pedro Alves <palves@redhat.com>
* top.c (wait_sync_command_done): Don't assume current_ui doesn't
diff --git a/gdb/remote.c b/gdb/remote.c
index 910ac81..13258b9e 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -6029,7 +6029,7 @@ remote_notif_stop_ack (struct notif_client *self, char *buf,
struct stop_reply *stop_reply = (struct stop_reply *) event;
/* acknowledge */
- putpkt ((char *) self->ack_command);
+ putpkt (self->ack_command);
if (stop_reply->ws.kind == TARGET_WAITKIND_IGNORE)
/* We got an unknown stop reply. */
@@ -6979,8 +6979,8 @@ remote_wait_as (ptid_t ptid, struct target_waitstatus *status, int options)
rs->last_sent_signal = GDB_SIGNAL_0;
target_terminal_inferior ();
- strcpy ((char *) buf, rs->last_sent_step ? "s" : "c");
- putpkt ((char *) buf);
+ strcpy (buf, rs->last_sent_step ? "s" : "c");
+ putpkt (buf);
break;
}
/* else fallthrough */
@@ -13395,7 +13395,7 @@ show_remote_cmd (char *args, int from_tty)
ui_out_field_string (uiout, "name", list->name);
ui_out_text (uiout, ": ");
if (list->type == show_cmd)
- do_show_command ((char *) NULL, from_tty, list);
+ do_show_command (NULL, from_tty, list);
else
cmd_func (list, NULL, from_tty);
/* Close the tuple. */