Skip to content

Commit 33861a8

Browse files
author
MarcoFalke
committed
Merge #18145: build: add Wreturn-type to Werror flags, check on more Travis machines
c98c26e ci: use --enable-werror on more hosts (Sjors Provoost) 6ba617d build: add Wreturn-type to Werror flags (Sjors Provoost) Pull request description: I overlooked a missing `return false` in bitcoin/bitcoin#17577 (comment) 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 c98c26e Tree-SHA512: 64e86c67fef2c5048aab201a8400b7e4a6f27b93d626159ba0b2807b5f119d2b0a83e3372db88f692cb4b0d059722d6a642d130c74a4f991a27f3a6b21780b5f
2 parents 2a2631f + c98c26e commit 33861a8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ci/test/00_setup_env_arm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ export RUN_FUNCTIONAL_TESTS=true
2525
export GOAL="install"
2626
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
2727
# This could be removed once the ABI change warning does not show up by default
28-
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi"
28+
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi --enable-werror"

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ if test "x$enable_werror" = "xyes"; then
330330
AX_CHECK_COMPILE_FLAG([-Werror=thread-safety-analysis],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety-analysis"],,[[$CXXFLAG_WERROR]])
331331
AX_CHECK_COMPILE_FLAG([-Werror=unused-variable],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unused-variable"],,[[$CXXFLAG_WERROR]])
332332
AX_CHECK_COMPILE_FLAG([-Werror=date-time],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=date-time"],,[[$CXXFLAG_WERROR]])
333+
AX_CHECK_COMPILE_FLAG([-Werror=return-type],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=return-type"],,[[$CXXFLAG_WERROR]])
333334
fi
334335

335336
if test "x$CXXFLAGS_overridden" = "xno"; then

0 commit comments

Comments
 (0)