From 1650ca11248ca377a6c8b6f7e21ec2aa8e7b3fd5 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 24 Oct 2015 22:28:56 -0400 Subject: [PATCH] cli-setshow.c: Constify variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: /home/simark/src/binutils-gdb/gdb/cli/cli-setshow.c:390:13: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] p = strchr (arg, ' '); ^ gdb/ChangeLog: * cli/cli-setshow.c (do_set_command): Constify p. --- gdb/ChangeLog | 4 ++++ gdb/cli/cli-setshow.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d658649025d..3017fd0da09 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-10-24 Simon Marchi + + * cli/cli-setshow.c (do_set_command): Constify p. + 2015-10-24 Simon Marchi * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Replace diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index 1ffb80b4a65..74d2d007e39 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -361,7 +361,7 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c) int len; int nmatches; const char *match = NULL; - char *p; + const char *p; /* If no argument was supplied, print an informative error message. */ -- 2.30.2