[collectd] [PATCH] Removed the use of -Werror when compiling with gcc

Dan Fandrich dan at coneharvesters.com
Sat Mar 2 15:19:45 CET 2013


While the goal of building warning-free is noble, erroring out
on warnings by default makes the build too brittle with ever-
changing warning behaviour in newer versions of gcc.
---
 configure.in                      |    6 +++---
 src/Makefile.am                   |    2 +-
 src/libcollectdclient/Makefile.am |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.in b/configure.in
index 6572a19..7c55827 100644
--- a/configure.in
+++ b/configure.in
@@ -577,7 +577,7 @@ SAVE_CFLAGS="$CFLAGS"
 # Emulate behavior of src/Makefile.am
 if test "x$GCC" = "xyes"
 then
-	CFLAGS="$CFLAGS -Wall -Werror"
+	CFLAGS="$CFLAGS -Wall"
 fi
 
 AC_CACHE_CHECK([for strtok_r],
@@ -704,7 +704,7 @@ AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
 if test "x$GCC" = "xyes"
 then
 	SAVE_CFLAGS="$CFLAGS"
-	CFLAGS="$CFLAGS -Wall -Wextra -Werror"
+	CFLAGS="$CFLAGS -Wall -Wextra"
 fi
 
 AC_CHECK_FUNCS(strptime, [have_strptime="yes"], [have_strptime="no"])
@@ -3122,7 +3122,7 @@ then
 	SAVE_LDFLAGS="$LDFLAGS"
 	# trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
 	# (see issues #41 and #42)
-	CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
+	CFLAGS="$CFLAGS $PERL_CFLAGS -Wall"
 	LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
 
 	AC_CACHE_CHECK([for broken Perl_load_module()],
diff --git a/src/Makefile.am b/src/Makefile.am
index c41afb3..3910bfd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,7 +4,7 @@ SUBDIRS += liboconfig
 endif
 
 if COMPILER_IS_GCC
-AM_CFLAGS = -Wall -Werror
+AM_CFLAGS = -Wall
 endif
 
 AM_CPPFLAGS = -DPREFIX='"${prefix}"'
diff --git a/src/libcollectdclient/Makefile.am b/src/libcollectdclient/Makefile.am
index 1d4dff5..7b2c96e 100644
--- a/src/libcollectdclient/Makefile.am
+++ b/src/libcollectdclient/Makefile.am
@@ -1,7 +1,7 @@
 AUTOMAKE_OPTIONS = foreign no-dependencies
 
 if COMPILER_IS_GCC
-AM_CFLAGS = -Wall -Werror
+AM_CFLAGS = -Wall
 endif
 
 pkginclude_HEADERS = collectd/client.h collectd/network.h collectd/network_buffer.h collectd/lcc_features.h
-- 
1.7.10




More information about the collectd mailing list