From 2a1dde5da23779fd0d269c3e51c7814aba9001dd Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 8 Nov 2017 15:20:41 +0000 Subject: Fix "make test-cp-name-parser" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/gdb/cp-name-parser.y: In function ‘int main(int, char**)’: src/gdb/cp-name-parser.y:2132:30: error: ISO C++ forbids converting a string constant to ‘char*’ [-Werror=write-strings] char *str2, *extra_chars = "", c; ^ Simply don't initialize the variable, it's not necessary. gdb/ChangeLog: 2017-11-08 Pedro Alves * cp-name-parser.y (main): Don't initialize extra_chars. --- gdb/cp-name-parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/cp-name-parser.y') diff --git a/gdb/cp-name-parser.y b/gdb/cp-name-parser.y index d430ae7..33ecf13 100644 --- a/gdb/cp-name-parser.y +++ b/gdb/cp-name-parser.y @@ -2129,7 +2129,7 @@ internal_error (const char *file, int line, const char *fmt, ...) int main (int argc, char **argv) { - char *str2, *extra_chars = "", c; + char *str2, *extra_chars, c; char buf[65536]; int arg; const char *errmsg; -- cgit v1.1