constify error_no_arg
authorTom Tromey <tromey@redhat.com>
Fri, 27 Dec 2013 21:36:35 +0000 (14:36 -0700)
committerTom Tromey <tromey@redhat.com>
Thu, 26 Jun 2014 15:14:18 +0000 (09:14 -0600)
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.

gdb/ChangeLog
gdb/cli/cli-cmds.c
gdb/command.h

index 2b26f63..c60fad8 100644 (file)
@@ -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.
index a4f52f8..2e08a5c 100644 (file)
@@ -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);
 }
index a5040a4..bc9728f 100644 (file)
@@ -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);