aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2016-11-26 22:05:42 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2016-11-26 22:05:42 -0500
commitd2c0eef48a1bb331ca08f8f26ff82c5d4086ba0c (patch)
tree76dc8a66856e9223a9b77bb9a9c55ed49331def8 /gdb/mi
parent82bbe65a43015a753bec8c64869679a699331a5b (diff)
Constify wrap_here/wrap_hint code path
Constify the data path between ui_out_wrap_hint and the wrap_indent global, because we can. It's clearer that the argument passed to wrap_hint is not intended to be modified by the ui_out implementation. gdb/ChangeLog: * mi/mi-out.c (mi_wrap_hint): Constify argument. * cli-out.c (cli_wrap_hint): Likewise. * ui-out.c (ui_out_wrap_hint, uo_wrap_hint): Likewise. * ui-out.h (ui_out_wrap_hint, wrap_hint_ftype): Likewise. * utils.c (wrap_here): Likewise. (wrap_indent): Constify. * utils.h (wrap_here): Constify argument.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-out.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c
index 0f48426094..960529c712 100644
--- a/gdb/mi/mi-out.c
+++ b/gdb/mi/mi-out.c
@@ -65,7 +65,7 @@ static void mi_text (struct ui_out *uiout, const char *string);
static void mi_message (struct ui_out *uiout, int verbosity,
const char *format, va_list args)
ATTRIBUTE_PRINTF (3, 0);
-static void mi_wrap_hint (struct ui_out *uiout, char *identstring);
+static void mi_wrap_hint (struct ui_out *uiout, const char *identstring);
static void mi_flush (struct ui_out *uiout);
static int mi_redirect (struct ui_out *uiout, struct ui_file *outstream);
@@ -273,7 +273,7 @@ mi_message (struct ui_out *uiout, int verbosity,
}
void
-mi_wrap_hint (struct ui_out *uiout, char *identstring)
+mi_wrap_hint (struct ui_out *uiout, const char *identstring)
{
wrap_here (identstring);
}