Drop -pedantic from default gcc flags and restore use of explicit initializer fields.
authorYann Dirson <ydirson@free.fr>
Wed, 6 Nov 2013 21:22:51 +0000 (22:22 +0100)
committerYann Dirson <ydirson@free.fr>
Sat, 9 Nov 2013 21:22:22 +0000 (22:22 +0100)
This flag includes warnings for the explicit initializer construct,
but it is much too useful.

configure.ac
gnushogi/rawdsp.c

index 42f3f8c..b13f537 100644 (file)
@@ -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"
index 5c4d45d..d868179 100644 (file)
@@ -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");