From 6ba617dbe2b79d13ceec7d452e44ecab3bb814e7 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Fri, 14 Feb 2020 10:19:04 +0100 Subject: [PATCH 1/2] build: add Wreturn-type to Werror flags This is supported by GCC and Clang. https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html https://clang.llvm.org/docs/DiagnosticsReference.html#wreturn-type --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index dc233c8423..d0fcf48713 100644 --- a/configure.ac +++ b/configure.ac @@ -330,6 +330,7 @@ if test "x$enable_werror" = "xyes"; then AX_CHECK_COMPILE_FLAG([-Werror=thread-safety-analysis],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety-analysis"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=unused-variable],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unused-variable"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Werror=date-time],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=date-time"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Werror=return-type],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=return-type"],,[[$CXXFLAG_WERROR]]) fi if test "x$CXXFLAGS_overridden" = "xno"; then From c98c26ee992f204b17bf17d271512b36c40ad8c5 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Fri, 14 Feb 2020 10:20:10 +0100 Subject: [PATCH 2/2] ci: use --enable-werror on more hosts --- ci/test/00_setup_env_arm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test/00_setup_env_arm.sh b/ci/test/00_setup_env_arm.sh index 86dd423eab..2b30b4a5e3 100644 --- a/ci/test/00_setup_env_arm.sh +++ b/ci/test/00_setup_env_arm.sh @@ -25,4 +25,4 @@ export RUN_FUNCTIONAL_TESTS=true export GOAL="install" # -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1" # This could be removed once the ABI change warning does not show up by default -export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi" +export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi --enable-werror"