aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-02-16 09:22:01 -0800
committerMarcoFalke <falke.marco@gmail.com>2020-02-16 09:22:06 -0800
commit33861a836727cc0514f9ec8de0e692b89f98c410 (patch)
tree4b54d39e757252b582fb8e7331cf5ee97a701403
parent2a2631fb0dc781504df0f3fe8b42f21cbdb6f20d (diff)
parentc98c26ee992f204b17bf17d271512b36c40ad8c5 (diff)
downloadbitcoin-33861a836727cc0514f9ec8de0e692b89f98c410.tar.xz
Merge #18145: build: add Wreturn-type to Werror flags, check on more Travis machines
c98c26ee992f204b17bf17d271512b36c40ad8c5 ci: use --enable-werror on more hosts (Sjors Provoost) 6ba617dbe2b79d13ceec7d452e44ecab3bb814e7 build: add Wreturn-type to Werror flags (Sjors Provoost) Pull request description: I overlooked a missing `return false` in https://github.com/bitcoin/bitcoin/pull/17577#discussion_r379137776 and the warning only showed up on one Travis machine (`warning: control reaches end of non-void function [-Wreturn-type]`). This PR promotes `Wreturn-type` to an error when configured with `--enable-werror`. I also added `--enable-werror` to the Travis machine that happened to catch this particular instance. ACKs for top commit: vasild: ACK c98c26e. practicalswift: ACK c98c26ee992f204b17bf17d271512b36c40ad8c5 Tree-SHA512: 64e86c67fef2c5048aab201a8400b7e4a6f27b93d626159ba0b2807b5f119d2b0a83e3372db88f692cb4b0d059722d6a642d130c74a4f991a27f3a6b21780b5f
-rw-r--r--ci/test/00_setup_env_arm.sh2
-rw-r--r--configure.ac1
2 files changed, 2 insertions, 1 deletions
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"
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