From: Yann Dirson Date: Wed, 6 Nov 2013 21:22:51 +0000 (+0100) Subject: Drop -pedantic from default gcc flags and restore use of explicit initializer fields. X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=68871eead44429bb60b11bca55de79f59aeccef3;p=gnushogi.git Drop -pedantic from default gcc flags and restore use of explicit initializer fields. This flag includes warnings for the explicit initializer construct, but it is much too useful. --- diff --git a/configure.ac b/configure.ac index 42f3f8c..b13f537 100644 --- a/configure.ac +++ b/configure.ac @@ -57,7 +57,7 @@ AC_CHECK_LIB(termcap, tgoto) if [[ $ac_cv_c_compiler_gnu = yes ]] then -WARNINGS="-Wall -Wno-implicit-int -Wstrict-prototypes -ansi -pedantic" +WARNINGS="-Wall -Wno-implicit-int -Wstrict-prototypes -ansi" CEXTRAFLAGS="-fsigned-char -funroll-loops" # For profiling targets: CEXTRAFLAGS2="-fsigned-char -pg -fprofile-arcs -ftest-coverage" diff --git a/gnushogi/rawdsp.c b/gnushogi/rawdsp.c index 5c4d45d..d868179 100644 --- a/gnushogi/rawdsp.c +++ b/gnushogi/rawdsp.c @@ -956,8 +956,8 @@ Raw_PollForInput(void) if (!PeekNamedPipe(GetStdHandle(STD_INPUT_HANDLE), NULL, 0, NULL, &cnt, NULL)) cnt = 1; #else - static struct pollfd pollfds[1] = { /* [0] = */ { /* .fd = */ STDIN_FILENO, - /* .events = */ POLLIN } }; + static struct pollfd pollfds[1] = { [0] = { .fd = STDIN_FILENO, + .events = POLLIN } }; int cnt = poll(pollfds, sizeof(pollfds)/sizeof(pollfds[0]), 0); if (cnt < 0) { perror("polling standard input");