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.
This commit is contained in:
Tom Tromey 2014-07-21 20:37:34 -06:00
parent 64669f3b4b
commit 429e55ea94
5 changed files with 13 additions and 5 deletions

View file

@ -261,7 +261,7 @@ add_cmd (const char *name, enum command_class class, cmd_cfunc_ftype *fun,
Returns a pointer to the deprecated command. */
struct cmd_list_element *
deprecate_cmd (struct cmd_list_element *cmd, char *replacement)
deprecate_cmd (struct cmd_list_element *cmd, const char *replacement)
{
cmd->cmd_deprecated = 1;
cmd->deprecated_warn_user = 1;