diff options
author | Pedro Alves <palves@redhat.com> | 2017-04-05 19:21:34 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-04-05 19:21:34 +0100 |
commit | 69bbf465237819bd7bf2a21a682d695273b3c8cb (patch) | |
tree | 3850a83c0de5799d95dd93a61bcbf38fca934407 /gdb/utils.c | |
parent | be47f9e8180d7275b0e2b26998472e99be9a2d7b (diff) | |
download | fsf-binutils-gdb-69bbf465237819bd7bf2a21a682d695273b3c8cb.zip fsf-binutils-gdb-69bbf465237819bd7bf2a21a682d695273b3c8cb.tar.gz fsf-binutils-gdb-69bbf465237819bd7bf2a21a682d695273b3c8cb.tar.bz2 |
-Wwrite-strings: Constify warning_pre_print
-Wwrite-strings flags a warning here:
char *warning_pre_print = "\nwarning: ";
gdb/ChangeLog:
2017-04-05 Pedro Alves <palves@redhat.com>
* main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
the memory of the temporary warning_pre_print override.
* utils.c (warning_pre_print): Constify.
* utils.h (warning_pre_print): Constify.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index 39798cc..6b8f2f7 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -122,7 +122,7 @@ show_sevenbit_strings (struct ui_file *file, int from_tty, /* String to be printed before warning messages, if any. */ -char *warning_pre_print = "\nwarning: "; +const char *warning_pre_print = "\nwarning: "; int pagination_enabled = 1; static void |