Browse Source

Try to disable warning, caused by a flaw in GCC socket macros

Using select to solve #474 needs to use socket macros, but they seem
to cause sign-conversion warnings for some GCC versions.

http://www.linuxquestions.org/questions/programming-9/impossible-to-use-gcc-with-wconversion-and-standard-socket-macros-841935/

Since the socket macros are defined in the standards, an explicit
type cast must not be used - it would cause warnings for standard
compliant compilers.
bel2125 8 years ago
parent
commit
a0775233a2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/civetweb.c

+ 1 - 1
src/civetweb.c

@@ -5189,7 +5189,7 @@ push_inner(struct mg_context *ctx,
  * http://www.linuxquestions.org/questions/programming-9/impossible-to-use-gcc-with-wconversion-and-standard-socket-macros-841935/
  * http://www.linuxquestions.org/questions/programming-9/impossible-to-use-gcc-with-wconversion-and-standard-socket-macros-841935/
  */
  */
 #pragma GCC diagnostic push
 #pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wconversion"
+#pragma GCC diagnostic ignored "-Wsign-conversion"
 #endif
 #endif
 
 
 			FD_ZERO(&wfds);
 			FD_ZERO(&wfds);