From 64e61d290ec53c27767d0d828f01ab6ae95a7478 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 21 Jul 2014 20:43:04 -0600 Subject: constify command prefix This constifies the "prefix" argument to the various command-adding functions. 2014-07-24 Tom Tromey * cli/cli-decode.c (print_help_for_command): Make "prefix" const. (add_prefix_cmd, add_abbrev_prefix_cmd, apropos_cmd, help_list) (help_cmd_list): Constify. (lookup_cmd): Update. * cli/cli-decode.h (struct cmd_list_element) : Now const. (help_cmd_list, apropos_cmd): Update. * cli/cli-script.c (show_user): Update. * cli/cli-setshow.c (cmd_show_list): Make "prefix" const. * cli/cli-setshow.h (cmd_show_list): Update. * command.h (add_prefix_cmd, add_abbrev_prefix_cmd, help_list) (cmd_show_list): Update. * guile/scm-cmd.c (cmdscm_destroyer): Update. * python/py-cmd.c (cmdpy_destroyer): Update. --- gdb/cli/cli-script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/cli/cli-script.c') diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c index 7dc1ba4..1147073 100644 --- a/gdb/cli/cli-script.c +++ b/gdb/cli/cli-script.c @@ -1707,7 +1707,7 @@ show_user_1 (struct cmd_list_element *c, const char *prefix, const char *name, if (c->prefixlist != NULL) { - char *prefixname = c->prefixname; + const char *prefixname = c->prefixname; for (c = *c->prefixlist; c != NULL; c = c->next) if (c->class == class_user || c->prefixlist != NULL) -- cgit v1.1