This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 4/4] constify error_no_arg


This is a trivial patch to make error_no_arg take a const argument.

2014-06-19  Tom Tromey  <tromey@redhat.com>

	* cli/cli-cmds.c (error_no_arg): Make "why" const.
	* command.h (error_no_arg): Update.
---
 gdb/ChangeLog      | 5 +++++
 gdb/cli/cli-cmds.c | 2 +-
 gdb/command.h      | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

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);
 
-- 
1.9.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]