This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 5/6] Add qualifier 'const' to argument args
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Mon, 6 Jan 2014 11:54:57 +0800
- Subject: [PATCH 5/6] Add qualifier 'const' to argument args
- Authentication-results: sourceware.org; auth=none
- References: <1388980498-10886-1-git-send-email-yao at codesourcery dot com>
This patch fixes the following error.
../../../git/gdb/gnu-nat.c: In function 'info_port_rights':
../../../git/gdb/gnu-nat.c:3083:11: error: passing argument 1 of 'parse_to_comma_and_eval' from incompatible pointer type [-Werror]
In file included from ../../../git/gdb/breakpoint.h:23:0,
from ../../../git/gdb/inferior.h:37,
from ../../../git/gdb/gnu-nat.c:55:
../../../git/gdb/value.h:763:22: note: expected 'const char **' but argument is of type 'char **'
gdb:
2014-01-06 Yao Qi <yao@codesourcery.com>
* gnu-nat.c (info_port_rights): Add qualifier const to
argument args.
---
gdb/gnu-nat.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 7948677..7397ec8 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -3070,7 +3070,7 @@ set_noninvasive_cmd (char *args, int from_tty)
static void
-info_port_rights (char *args, mach_port_type_t only)
+info_port_rights (const char *args, mach_port_type_t only)
{
struct inf *inf = active_inf ();
struct value *vmark = value_mark ();
--
1.7.7.6