Page MenuHomePhabricator

[backport#17261 4/13] List output types in an array in order to be iterated over
ClosedPublic

Authored by majcosta on Oct 9 2020, 14:56.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

majcosta requested review of this revision.Oct 9 2020, 14:56

Snippet of first build failure:

[290/434] Building CXX object src/CMakeFiles/server.dir/rpc/command.cpp.o
[291/434] Building CXX object src/CMakeFiles/server.dir/pow/pow.cpp.o
[292/434] Building CXX object src/CMakeFiles/server.dir/rest.cpp.o
[293/434] Building CXX object src/CMakeFiles/common.dir/amount.cpp.o
[294/434] Building CXX object src/CMakeFiles/server.dir/script/scriptcache.cpp.o
[295/434] Building CXX object src/CMakeFiles/server.dir/script/sigcache.cpp.o
[296/434] Building CXX object src/CMakeFiles/server.dir/shutdown.cpp.o
[297/434] Building CXX object src/CMakeFiles/common.dir/outputtype.cpp.o
FAILED: src/CMakeFiles/common.dir/outputtype.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -isystem /usr/include/jemalloc -Werror -g -O2 -fPIC -fvisibility=hidden   -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wshadow -Wredundant-decls -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++14 -MD -MT src/CMakeFiles/common.dir/outputtype.cpp.o -MF src/CMakeFiles/common.dir/outputtype.cpp.o.d -o src/CMakeFiles/common.dir/outputtype.cpp.o -c ../../src/outputtype.cpp
../../src/outputtype.cpp:17:67: error: missing braces around initializer for ‘std::__array_traits<OutputType, 1>::_Type’ {aka ‘OutputType [1]’} [-Werror=missing-braces]
 const std::array<OutputType, 1> OUTPUT_TYPES = {OutputType::LEGACY};
                                                                   ^
cc1plus: all warnings being treated as errors
[298/434] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[299/434] Building CXX object src/CMakeFiles/server.dir/txdb.cpp.o
[300/434] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[301/434] Building CXX object src/CMakeFiles/server.dir/ui_interface.cpp.o
[302/434] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[303/434] Building CXX object src/CMakeFiles/server.dir/validationinterface.cpp.o
[304/434] Building CXX object src/CMakeFiles/server.dir/versionbits.cpp.o
[305/434] Building CXX object src/CMakeFiles/server.dir/dummywallet.cpp.o
[306/434] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[307/434] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[308/434] Building C object src/secp256k1/CMakeFiles/sign-bench.dir/src/bench_sign.c.o
[309/434] Building C object src/secp256k1/CMakeFiles/verify-bench.dir/src/bench_verify.c.o
[310/434] Building C object src/secp256k1/CMakeFiles/recover-bench.dir/src/bench_recover.c.o
[311/434] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[312/434] Linking C static library src/secp256k1/libsecp256k1.a
[313/434] Linking C executable src/secp256k1/ecmult-bench
[314/434] Linking C executable src/secp256k1/internal-bench
[315/434] Linking C executable src/secp256k1/sign-bench
[316/434] Linking C executable src/secp256k1/verify-bench
[317/434] Linking C executable src/secp256k1/recover-bench
[318/434] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[319/434] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[320/434] Building CXX object src/CMakeFiles/server.dir/timedata.cpp.o
[321/434] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[322/434] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[323/434] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[324/434] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[325/434] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[326/434] Building CXX object src/seeder/CMakeFiles/seeder.dir/bitcoin.cpp.o
[327/434] Building CXX object src/seeder/CMakeFiles/seeder.dir/db.cpp.o
[328/434] Building CXX object src/seeder/CMakeFiles/seeder.dir/dns.cpp.o
[329/434] Building CXX object src/CMakeFiles/common.dir/rpc/rawtransaction_util.cpp.o
[330/434] Building CXX object src/CMakeFiles/common.dir/rpc/util.cpp.o
[331/434] Building CXX object src/CMakeFiles/server.dir/node/coinstats.cpp.o
[332/434] Building CXX object src/CMakeFiles/server.dir/rpc/abc.cpp.o
[333/434] Building CXX object src/CMakeFiles/server.dir/rpc/misc.cpp.o
[334/434] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[335/434] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[336/434] Building CXX object src/CMakeFiles/server.dir/rpc/net.cpp.o
[337/434] Building CXX object src/CMakeFiles/server.dir/rpc/mining.cpp.o
[338/434] Building CXX object src/CMakeFiles/server.dir/rpc/server.cpp.o
[339/434] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[340/434] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[341/434] Building CXX object src/CMakeFiles/server.dir/init.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Snippet of first build failure:

[309/485] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/primitives/transaction.cpp.o
[310/485] Building C object src/secp256k1/CMakeFiles/sign-bench.dir/src/bench_sign.c.o
[311/485] Building CXX object src/CMakeFiles/script.dir/script/sign.cpp.o
[312/485] Building C object src/secp256k1/CMakeFiles/recover-bench.dir/src/bench_recover.c.o
[313/485] Building C object src/secp256k1/CMakeFiles/verify-bench.dir/src/bench_verify.c.o
[314/485] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[315/485] Building CXX object src/CMakeFiles/script.dir/script/interpreter.cpp.o
[316/485] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[317/485] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/util/strencodings.cpp.o
[318/485] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[319/485] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[320/485] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[321/485] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[322/485] Building CXX object src/CMakeFiles/script.dir/script/signingprovider.cpp.o
[323/485] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[324/485] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[325/485] Linking C static library src/secp256k1/libsecp256k1.a
[326/485] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[327/485] Linking C executable src/secp256k1/ecmult-bench
[328/485] Linking C executable src/secp256k1/internal-bench
[329/485] Linking CXX static library src/libscript.a
[330/485] Linking C executable src/secp256k1/sign-bench
[331/485] Linking C executable src/secp256k1/verify-bench
[332/485] Installing component secp256k1
-- Install configuration: "RelWithDebInfo"
-- Install component: "secp256k1"
-- Installing: /results/artifacts/lib/libsecp256k1.a
-- Installing: /results/artifacts/include/secp256k1.h
-- Installing: /results/artifacts/include/secp256k1_preallocated.h
-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[333/485] Linking C executable src/secp256k1/recover-bench
[334/485] Building CXX object src/CMakeFiles/bitcoin-cli.dir/bitcoin-cli.cpp.o
[335/485] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[336/485] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[337/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[338/485] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[339/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[340/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[341/485] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[342/485] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[343/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[344/485] Building CXX object src/seeder/CMakeFiles/seeder.dir/bitcoin.cpp.o
[345/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/psbtwallet.cpp.o
[346/485] Building CXX object src/seeder/CMakeFiles/seeder.dir/dns.cpp.o
[347/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[348/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[349/485] Building CXX object src/seeder/CMakeFiles/seeder.dir/db.cpp.o
[350/485] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[351/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[352/485] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[353/485] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[354/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[355/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[356/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[357/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[358/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[359/485] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1

fix Wmissing-braces warning

deadalnix requested changes to this revision.Oct 9 2020, 21:48
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/outputtype.cpp
17 ↗(On Diff #24473)

lol, that looks exceedingly useful XD

This revision now requires changes to proceed.Oct 9 2020, 21:48

well, this one's out the window then 😆

actually it's probably better if I do the cleanup for this thing in a separate diff instead of hunting for it in 12 revisions lol

This revision now requires changes to proceed.Oct 10 2020, 00:15

will remove the use of OUTPUT_TYPES in a diff of its own as not to play whack-a-mole across 12 revision

This revision is now accepted and ready to land.Oct 10 2020, 13:26