aboutsummaryrefslogtreecommitdiff
path: root/gdb/maint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-07-21 20:37:34 -0600
committerTom Tromey <tromey@redhat.com>2014-07-24 11:30:03 -0600
commit429e55ea941f54f8e0481dd2048dc15af751ed71 (patch)
tree6a5b542cb8dee24e8a2ebe286537ac7e16eee3e2 /gdb/maint.c
parent64669f3b4bab4096df75b7279c5b2d0a4784b835 (diff)
downloadgdb-429e55ea941f54f8e0481dd2048dc15af751ed71.zip
gdb-429e55ea941f54f8e0481dd2048dc15af751ed71.tar.gz
gdb-429e55ea941f54f8e0481dd2048dc15af751ed71.tar.bz2
constify deprecate_cmd
This constifies deprecate_cmd and the "replacement" field in struct cmd_list_element. 2014-07-24 Tom Tromey <tromey@redhat.com> * cli/cli-decode.c (deprecate_cmd): Make "replacement" const. * cli/cli-decode.h (struct cmd_list_element) <replacement>: Now const. * command.h (deprecate_cmd): Update. * maint.c (maintenance_do_deprecate): Add casts.
Diffstat (limited to 'gdb/maint.c')
-rw-r--r--gdb/maint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/maint.c b/gdb/maint.c
index 99c7f9e..d4d5810 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -628,7 +628,7 @@ maintenance_do_deprecate (char *text, int deprecate)
if (alias)
{
if (alias->malloced_replacement)
- xfree (alias->replacement);
+ xfree ((char *) alias->replacement);
if (deprecate)
{
@@ -647,7 +647,7 @@ maintenance_do_deprecate (char *text, int deprecate)
else if (cmd)
{
if (cmd->malloced_replacement)
- xfree (cmd->replacement);
+ xfree ((char *) cmd->replacement);
if (deprecate)
{