From d2c0eef48a1bb331ca08f8f26ff82c5d4086ba0c Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 26 Nov 2016 22:05:42 -0500 Subject: 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. --- gdb/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/utils.c') diff --git a/gdb/utils.c b/gdb/utils.c index 8ca0a2e..3a88e2a 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1628,7 +1628,7 @@ static char *wrap_pointer; /* String to indent by if the wrap occurs. Must not be NULL if wrap_column is non-zero. */ -static char *wrap_indent; +static const char *wrap_indent; /* Column number on the screen where wrap_buffer begins, or 0 if wrapping is not in effect. */ @@ -1911,7 +1911,7 @@ reinitialize_more_filter (void) used to force out output from the wrap_buffer. */ void -wrap_here (char *indent) +wrap_here (const char *indent) { /* This should have been allocated, but be paranoid anyway. */ if (!wrap_buffer) -- cgit v1.1