This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: GDB 7.99.91 MinGW compilation warning in tui.c
- From: Eli Zaretskii <eliz at gnu dot org>
- To: gdb-patches at sourceware dot org
- Date: Mon, 08 May 2017 18:01:41 +0300
- Subject: Re: GDB 7.99.91 MinGW compilation warning in tui.c
- Authentication-results: sourceware.org; auth=none
- References: <20170504194442.63AAF60B72@joel.gnat.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
The warning manifests itself as follows:
g++ -std=gnu++11 -O2 -gdwarf-4 -g3 -I. -I. -I./common -I./config -DLOCALEDIR="\"d:/usr/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -Id:/usr/include -Id:/usr/include/guile/2.0 -Id:/usr/include -Id:/usr/Python26/include -Id:/usr/Python26/include -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing -Wno-format -c -o tui.o -MT tui.o -MMD -MP -MF .deps/tui.Tpo tui/tui.c
tui/tui.c: In function 'void tui_enable()':
tui/tui.c:430:39: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
s = newterm ("unknown", stdout, stdin);
^
I fixed this by explicitly casting "unknown" to 'char *' -- is that
the right fix? Is it OK to push that fix?
Thanks.