diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-27 14:36:35 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-06-26 09:14:18 -0600 |
commit | 5b10184c5844524e59621dd40cefd1db69680f95 (patch) | |
tree | 2428465a35743f0051464b8f123892a7f48188f5 | |
parent | 069003265c89fab0c46c5a831c2beeec4bcfb501 (diff) | |
download | gdb-5b10184c5844524e59621dd40cefd1db69680f95.zip gdb-5b10184c5844524e59621dd40cefd1db69680f95.tar.gz gdb-5b10184c5844524e59621dd40cefd1db69680f95.tar.bz2 |
constify error_no_arg
This is a trivial patch to make error_no_arg take a const argument.
2014-06-26 Tom Tromey <tromey@redhat.com>
* cli/cli-cmds.c (error_no_arg): Make "why" const.
* command.h (error_no_arg): Update.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/cli/cli-cmds.c | 2 | ||||
-rw-r--r-- | gdb/command.h | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2b26f63..c60fad8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2014-06-26 Tom Tromey <tromey@redhat.com> + * cli/cli-cmds.c (error_no_arg): Make "why" const. + * command.h (error_no_arg): Update. + +2014-06-26 Tom Tromey <tromey@redhat.com> + * cli/cli-setshow.c (do_set_command): Make "arg" const. (do_show_command): Make "arg" const. * cli/cli-setshow.h (do_set_command, do_show_command): Update. diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index a4f52f8..2e08a5c 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -204,7 +204,7 @@ static const char *script_ext_mode = script_ext_soft; none is supplied. */ void -error_no_arg (char *why) +error_no_arg (const char *why) { error (_("Argument required (%s)."), why); } diff --git a/gdb/command.h b/gdb/command.h index a5040a4..bc9728f 100644 --- a/gdb/command.h +++ b/gdb/command.h @@ -378,7 +378,7 @@ extern void cmd_show_list (struct cmd_list_element *, int, char *); /* Used everywhere whenever at least one parameter is required and none is specified. */ -extern void error_no_arg (char *) ATTRIBUTE_NORETURN; +extern void error_no_arg (const char *) ATTRIBUTE_NORETURN; extern void dont_repeat (void); |