diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2015-09-21 18:47:33 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2015-09-21 18:47:57 -0400 |
commit | acaa662f29836ce4d4c3a0abc2132f285f9df585 (patch) | |
tree | 5b2a7153d406b6f2207f5354e78734b9ddcde2a1 /gdb/cli | |
parent | 7f7a1bce250bc286d23a4b895d684748bec03a71 (diff) | |
download | gdb-acaa662f29836ce4d4c3a0abc2132f285f9df585.zip gdb-acaa662f29836ce4d4c3a0abc2132f285f9df585.tar.gz gdb-acaa662f29836ce4d4c3a0abc2132f285f9df585.tar.bz2 |
Add two missing consts
Two missing consts, found while doing cxx-conversion work. We end up
with a char*, even though we pass a const char* to strstr. I am pushing
this as obvious.
gdb/ChangeLog:
* cli/cli-setshow.c (cmd_show_list): Constify a variable.
* linespec.c (linespec_lexer_lex_string): Same.
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-setshow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c index ca41d8e..64f09f2 100644 --- a/gdb/cli/cli-setshow.c +++ b/gdb/cli/cli-setshow.c @@ -683,7 +683,7 @@ cmd_show_list (struct cmd_list_element *list, int from_tty, const char *prefix) { struct cleanup *optionlist_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "optionlist"); - char *new_prefix = strstr (list->prefixname, "show ") + 5; + const char *new_prefix = strstr (list->prefixname, "show ") + 5; if (ui_out_is_mi_like_p (uiout)) ui_out_field_string (uiout, "prefix", new_prefix); |