This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 4/4] constify error_no_arg
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Thu, 19 Jun 2014 14:29:48 -0600
- Subject: [PATCH 4/4] constify error_no_arg
- Authentication-results: sourceware.org; auth=none
- References: <1403209788-1015-1-git-send-email-tromey at redhat dot com>
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