diff --git a/ci/test/00_setup_env_arm.sh b/ci/test/00_setup_env_arm.sh index 53807359718e..7e3136d5844d 100755 --- a/ci/test/00_setup_env_arm.sh +++ b/ci/test/00_setup_env_arm.sh @@ -26,4 +26,3 @@ 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-reduce-exports CXXFLAGS=-Wno-psabi --with-boost-process" -export NO_WERROR=1 diff --git a/ci/test/00_setup_env_native_nowallet.sh b/ci/test/00_setup_env_native_nowallet.sh index cf76fd67f416..3637d3b8d0da 100755 --- a/ci/test/00_setup_env_native_nowallet.sh +++ b/ci/test/00_setup_env_native_nowallet.sh @@ -12,4 +12,3 @@ export PACKAGES="python3-zmq" export DEP_OPTS="NO_WALLET=1 CC=gcc-14 CXX=g++-14" export GOAL="install" export BITCOIN_CONFIG="--enable-reduce-exports --with-boost-process CC=gcc-14 CXX=g++-14" -export NO_WERROR=1 diff --git a/ci/test/00_setup_env_native_qt5.sh b/ci/test/00_setup_env_native_qt5.sh index 2a9866383067..7614ae933ef2 100755 --- a/ci/test/00_setup_env_native_qt5.sh +++ b/ci/test/00_setup_env_native_qt5.sh @@ -16,4 +16,3 @@ export RUN_UNIT_TESTS="false" export GOAL="install" export PREVIOUS_RELEASES_TO_DOWNLOAD="v0.15.0.0 v0.16.1.1 v0.17.0.3 v18.2.2 v19.3.0 v20.0.1" export BITCOIN_CONFIG="--enable-zmq --with-libs=no --enable-reduce-exports --disable-fuzz-binary LDFLAGS=-static-libstdc++ --with-boost-process" -export NO_WERROR=1 diff --git a/ci/test/00_setup_env_native_sqlite.sh b/ci/test/00_setup_env_native_sqlite.sh index ec35f4061f7a..8af6d3fd9ae9 100755 --- a/ci/test/00_setup_env_native_sqlite.sh +++ b/ci/test/00_setup_env_native_sqlite.sh @@ -11,4 +11,3 @@ export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libhar export DEP_OPTS="NO_BDB=1 NO_UPNP=1 DEBUG=1" export GOAL="install" export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --with-sqlite --without-bdb CC=gcc-11 CXX=g++-11" -export NO_WERROR=1 diff --git a/ci/test/00_setup_env_win64.sh b/ci/test/00_setup_env_win64.sh index f1a4356f772d..fa39b532213e 100755 --- a/ci/test/00_setup_env_win64.sh +++ b/ci/test/00_setup_env_win64.sh @@ -18,4 +18,3 @@ export GOAL="deploy" # https://github.com/mingw-w64/mingw-w64/commit/1690994f515910a31b9fb7c7bd3a52d4ba987abe export BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --disable-miner --without-boost-process CXXFLAGS='-Wno-return-type -Wno-error=maybe-uninitialized -Wno-error=array-bounds'" export DIRECT_WINE_EXEC_TESTS=true -export NO_WERROR=1 diff --git a/configure.ac b/configure.ac index 41ba2952771b..2aded2cac746 100644 --- a/configure.ac +++ b/configure.ac @@ -452,9 +452,45 @@ if test "$enable_werror" = "yes"; then fi ERROR_CXXFLAGS=$CXXFLAG_WERROR - dnl -Wstringop-overread and -Wstringop-overflow are broken in gcc - AX_CHECK_COMPILE_FLAG([-Wstringop-overread], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wno-stringop-overread"], [], [$CXXFLAG_WERROR]) - AX_CHECK_COMPILE_FLAG([-Wstringop-overflow], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wno-stringop-overflow"], [], [$CXXFLAG_WERROR]) + dnl -Warray-bounds and -Wdangling-reference cause problems with GCC. Do not treat these warnings as errors. + dnl Suppress -Warray-bounds entirely because of noisy output, currently unhappy with immer implementation. + AX_CHECK_COMPILE_FLAG([-Warray-bounds], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-array-bounds"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([ + #if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__) + #error Non-GCC compiler detected, not setting flag + #endif + int main(void) { return 0; } + ])]) + dnl TODO: Remove suppression after backporting bitcoin#27605 + AX_CHECK_COMPILE_FLAG([-Wdangling-reference], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-error=dangling-reference"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([ + #if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__) + #error Non-GCC compiler detected, not setting flag + #endif + int main(void) { return 0; } + ])]) + + dnl -Wattributes cause problems with some versions of GCC. Do not treat these warnings as errors. + AX_CHECK_COMPILE_FLAG([-Wattributes], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-error=attributes"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([ + #if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__) + #error Non-GCC compiler detected, not setting flag + #elif defined(__GNUC__) && __GNUC__ >= 14 + #error GCC >=14 detected, not setting flag + #endif + int main(void) { return 0; } + ])]) + + dnl -Wstringop-overread and -Wstringop-overflow are broken in GCC. Suppress warnings entirely to avoid noisy output. + AX_CHECK_COMPILE_FLAG([-Wstringop-overread], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-stringop-overread"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([ + #if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__) + #error Non-GCC compiler detected, not setting flag + #endif + int main(void) { return 0; } + ])]) + AX_CHECK_COMPILE_FLAG([-Wstringop-overflow], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-stringop-overflow"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([ + #if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__) + #error Non-GCC compiler detected, not setting flag + #endif + int main(void) { return 0; } + ])]) fi AX_CHECK_COMPILE_FLAG([-Wall], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall"], [], [$CXXFLAG_WERROR]) diff --git a/src/Makefile.am b/src/Makefile.am index 8f5cac84d768..1f82cbf9f8bc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -773,6 +773,7 @@ libbitcoin_common_a_SOURCES = \ core_read.cpp \ core_write.cpp \ deploymentinfo.cpp \ + evo/core_write.cpp \ governance/common.cpp \ init/common.cpp \ key.cpp \ diff --git a/src/coinjoin/client.cpp b/src/coinjoin/client.cpp index 7e2747c91a6b..26b1e7cb70f5 100644 --- a/src/coinjoin/client.cpp +++ b/src/coinjoin/client.cpp @@ -4,6 +4,7 @@ #include +#include #include #include #include @@ -21,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/coinjoin/util.cpp b/src/coinjoin/util.cpp index a7c3235d3765..0a379a054f86 100644 --- a/src/coinjoin/util.cpp +++ b/src/coinjoin/util.cpp @@ -7,7 +7,6 @@ #include #include #include