-Wwrite-strings: Constify warning_pre_print
authorPedro Alves <palves@redhat.com>
Wed, 5 Apr 2017 18:21:34 +0000 (19:21 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 5 Apr 2017 18:21:34 +0000 (19:21 +0100)
commit69bbf465237819bd7bf2a21a682d695273b3c8cb
tree3850a83c0de5799d95dd93a61bcbf38fca934407
parentbe47f9e8180d7275b0e2b26998472e99be9a2d7b
-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.
gdb/ChangeLog
gdb/main.c
gdb/utils.c
gdb/utils.h
This page took 0.02427 seconds and 4 git commands to generate.