From 7469ac7032e26fe805c5d15ecded2d44253bc9c1 Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 26 Sep 2023 10:07:49 +0100 Subject: [PATCH] ci: disable -Werror=maybe-uninitialized for Windows builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This produces false positives, such as: ```bash torcontrol.cpp: In static member function ‘static void TorControlConnection::readcb(bufferevent*, void*)’: torcontrol.cpp:94:28: error: ‘result’ may be used uninitialized [-Werror=maybe-uninitialized] 94 | self->message.code = ToIntegral(s.substr(0, 3)).value_or(0); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ./netaddress.h:18, from ./torcontrol.h:11, from torcontrol.cpp:6: ./util/strencodings.h:184:7: note: ‘result’ was declared here 184 | T result; | ^~~~~~ cc1plus: all warnings being treated as errors make[2]: *** [Makefile:11088: libbitcoin_node_a-torcontrol.o] Error 1 ``` --- ci/test/00_setup_env_win64.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/test/00_setup_env_win64.sh b/ci/test/00_setup_env_win64.sh index bce5ee74b61..7d2a17bd75c 100755 --- a/ci/test/00_setup_env_win64.sh +++ b/ci/test/00_setup_env_win64.sh @@ -16,4 +16,4 @@ export GOAL="deploy" # Prior to 11.0.0, the mingw-w64 headers were missing noreturn attributes, causing warnings when # cross-compiling for Windows. https://sourceforge.net/p/mingw-w64/bugs/306/ # https://github.com/mingw-w64/mingw-w64/commit/1690994f515910a31b9fb7c7bd3a52d4ba987abe -export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests CXXFLAGS=-Wno-return-type" +export BITCOIN_CONFIG="--enable-reduce-exports --disable-gui-tests CXXFLAGS='-Wno-return-type -Wno-error=maybe-uninitialized'"