From 68871eead44429bb60b11bca55de79f59aeccef3 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Wed, 6 Nov 2013 22:22:51 +0100 Subject: [PATCH] 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. --- configure.ac | 2 +- gnushogi/rawdsp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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"); -- 1.7.0.4