Commit cfe875e72ebfe283dbc771e8387d8ef0b10d1995

Authored by Stéphane Raimbault
1 parent ef539e0d

Add -Wall and -Werror for GCC

- removed comment not required anymore with -Wall -Werror
configure.ac
... ... @@ -100,6 +100,21 @@ AC_CHECK_DECLS([__CYGWIN__])
100 100 AC_FUNC_FORK
101 101 AC_CHECK_FUNCS([gettimeofday inet_ntoa memset select socket strerror strlcpy])
102 102  
  103 +# Add -Wall -Werror for GCC if not already there
  104 +if test "x$GCC" = "xyes"; then
  105 + case " $CFLAGS " in
  106 + *[[\ \ ]]-Wall[[\ \ ]]*) ;;
  107 + *) CFLAGS="$CFLAGS -Wall" ;;
  108 + esac
  109 +fi
  110 +
  111 +if test "x$GCC" = "xyes"; then
  112 + case " $CFLAGS " in
  113 + *[[\ \ ]]-Werror[[\ \ ]]*) ;;
  114 + *) CFLAGS="$CFLAGS -Werror" ;;
  115 + esac
  116 +fi
  117 +
103 118 AC_CONFIG_FILES([
104 119 Makefile
105 120 src/Makefile
... ...
tests/bandwidth-server-many-up.c
... ... @@ -28,7 +28,6 @@
28 28 #include <ws2tcpip.h>
29 29 #else
30 30 #include <netinet/in.h>
31   -/* Required by inet_ntoa() to avoid a segfault! */
32 31 #include <arpa/inet.h>
33 32 #endif
34 33  
... ...