Skip to content

Commit

Permalink
Add -Wall and -Werror for GCC
Browse files Browse the repository at this point in the history
- removed comment not required anymore with -Wall -Werror
  • Loading branch information
stephane committed Dec 5, 2010
1 parent ef539e0 commit cfe875e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 15 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,21 @@ AC_CHECK_DECLS([__CYGWIN__])
AC_FUNC_FORK
AC_CHECK_FUNCS([gettimeofday inet_ntoa memset select socket strerror strlcpy])

# Add -Wall -Werror for GCC if not already there
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[[\ \ ]]-Wall[[\ \ ]]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi

if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[[\ \ ]]-Werror[[\ \ ]]*) ;;
*) CFLAGS="$CFLAGS -Werror" ;;
esac
fi

AC_CONFIG_FILES([
Makefile
src/Makefile
Expand Down
1 change: 0 additions & 1 deletion tests/bandwidth-server-many-up.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <ws2tcpip.h>
#else
#include <netinet/in.h>
/* Required by inet_ntoa() to avoid a segfault! */
#include <arpa/inet.h>
#endif

Expand Down

0 comments on commit cfe875e

Please sign in to comment.