Page MenuHomePhabricator

[backport#17237 1/2] wallet: Lock address type in ReserveDestination
ClosedPublic

Authored by majcosta on Sep 30 2020, 22:00.

Diff Detail

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

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

Snippet of first build failure:

     CWallet *const pwallet;
                    ^~~~~~~
cc1plus: all warnings being treated as errors
[365/484] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
FAILED: src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -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/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o -MF src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o.d -o src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o -c ../../src/wallet/rpcdump.cpp
In file included from ../../src/wallet/rpcdump.cpp:22:
../../src/./wallet/wallet.h: In constructor ‘ReserveDestination::ReserveDestination(CWallet*, OutputType)’:
../../src/./wallet/wallet.h:156:9: error: declaration of ‘type’ shadows a member of ‘ReserveDestination’ [-Werror=shadow]
         : pwallet(pwallet), type(type) {}
         ^
../../src/./wallet/wallet.h:142:22: note: shadowed declaration is here
     OutputType const type;
                      ^~~~
../../src/./wallet/wallet.h:156:9: error: declaration of ‘pwallet’ shadows a member of ‘ReserveDestination’ [-Werror=shadow]
         : pwallet(pwallet), type(type) {}
         ^
../../src/./wallet/wallet.h:140:20: note: shadowed declaration is here
     CWallet *const pwallet;
                    ^~~~~~~
cc1plus: all warnings being treated as errors
[366/484] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
FAILED: src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -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/wallet/CMakeFiles/wallet.dir/wallet.cpp.o -MF src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o.d -o src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o -c ../../src/wallet/wallet.cpp
In file included from ../../src/wallet/wallet.cpp:6:
../../src/./wallet/wallet.h: In constructor ‘ReserveDestination::ReserveDestination(CWallet*, OutputType)’:
../../src/./wallet/wallet.h:156:9: error: declaration of ‘type’ shadows a member of ‘ReserveDestination’ [-Werror=shadow]
         : pwallet(pwallet), type(type) {}
         ^
../../src/./wallet/wallet.h:142:22: note: shadowed declaration is here
     OutputType const type;
                      ^~~~
../../src/./wallet/wallet.h:156:9: error: declaration of ‘pwallet’ shadows a member of ‘ReserveDestination’ [-Werror=shadow]
         : pwallet(pwallet), type(type) {}
         ^
../../src/./wallet/wallet.h:140:20: note: shadowed declaration is here
     CWallet *const pwallet;
                    ^~~~~~~
cc1plus: all warnings being treated as errors
[367/484] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
FAILED: src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o 
/usr/bin/ccache /usr/bin/c++  -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -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/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o -MF src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o.d -o src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o -c ../../src/wallet/rpcwallet.cpp
In file included from ../../src/./wallet/coincontrol.h:10,
                 from ../../src/wallet/rpcwallet.cpp:29:
../../src/./wallet/wallet.h: In constructor ‘ReserveDestination::ReserveDestination(CWallet*, OutputType)’:
../../src/./wallet/wallet.h:156:9: error: declaration of ‘type’ shadows a member of ‘ReserveDestination’ [-Werror=shadow]
         : pwallet(pwallet), type(type) {}
         ^
../../src/./wallet/wallet.h:142:22: note: shadowed declaration is here
     OutputType const type;
                      ^~~~
../../src/./wallet/wallet.h:156:9: error: declaration of ‘pwallet’ shadows a member of ‘ReserveDestination’ [-Werror=shadow]
         : pwallet(pwallet), type(type) {}
         ^
../../src/./wallet/wallet.h:140:20: note: shadowed declaration is here
     CWallet *const pwallet;
                    ^~~~~~~
cc1plus: all warnings being treated as errors
ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1
jasonbcox requested changes to this revision.Sep 30 2020, 22:12
jasonbcox added a subscriber: jasonbcox.

See build failure

This revision now requires changes to proceed.Sep 30 2020, 22:12

renamed a couple constructor parameters to avoid shadowing warning from gcc

This revision is now accepted and ready to land.Sep 30 2020, 23:25

Snippet of first build failure:

[348/409] Running utility command for check-bitcoin-checkqueue_tests
[349/409] bitcoin: testing settings_tests
[350/409] bitcoin: testing checkdatasig_tests
[351/409] bitcoin: testing timedata_tests
[352/409] Running utility command for check-bitcoin-checkdatasig_tests
[353/409] Running utility command for check-bitcoin-settings_tests
[354/409] bitcoin: testing streams_tests
[355/409] Running utility command for check-bitcoin-timedata_tests
[356/409] Running utility command for check-bitcoin-streams_tests
[357/409] bitcoin: testing uint256_tests
[358/409] bitcoin: testing serialize_tests
[359/409] Running utility command for check-bitcoin-uint256_tests
[360/409] Running utility command for check-bitcoin-serialize_tests
[361/409] bitcoin: testing sigencoding_tests
[362/409] bitcoin: testing undo_tests
[363/409] bitcoin: testing walletdb_tests
[364/409] Running utility command for check-bitcoin-undo_tests
[365/409] Running utility command for check-bitcoin-sigencoding_tests
[366/409] Running utility command for check-bitcoin-walletdb_tests
[367/409] bitcoin: testing util_threadnames_tests
[368/409] bitcoin: testing radix_tests
[369/409] bitcoin: testing blockcheck_tests
[370/409] Running utility command for check-bitcoin-util_threadnames_tests
[371/409] Running utility command for check-bitcoin-radix_tests
[372/409] Running utility command for check-bitcoin-blockcheck_tests
[373/409] bitcoin: testing script_standard_tests
[374/409] Running utility command for check-bitcoin-script_standard_tests
[375/409] bitcoin: testing crypto_tests
[376/409] bitcoin: testing ismine_tests
[377/409] Running utility command for check-bitcoin-crypto_tests
[378/409] Running utility command for check-bitcoin-ismine_tests
[379/409] bitcoin: testing blockstatus_tests
[380/409] Running utility command for check-bitcoin-blockstatus_tests
[381/409] bitcoin: testing cashaddr_tests
[382/409] Running utility command for check-bitcoin-cashaddr_tests
[383/409] bitcoin: testing getarg_tests
[384/409] bitcoin: testing versionbits_tests
[385/409] Running utility command for check-bitcoin-getarg_tests
[386/409] Running utility command for check-bitcoin-versionbits_tests
[387/409] bitcoin: testing bswap_tests
[388/409] Running utility command for check-bitcoin-bswap_tests
[389/409] bitcoin: testing script_tests
[390/409] Running utility command for check-bitcoin-script_tests
[391/409] bitcoin: testing validation_tests
[392/409] Running utility command for check-bitcoin-validation_tests
[393/409] bitcoin: testing skiplist_tests
[394/409] Running utility command for check-bitcoin-skiplist_tests
[395/409] bitcoin: testing util_tests
[396/409] Running utility command for check-bitcoin-util_tests
[397/409] bitcoin: testing op_reversebytes_tests
[398/409] Running utility command for check-bitcoin-op_reversebytes_tests
[399/409] bitcoin: testing cuckoocache_tests
[400/409] Running utility command for check-bitcoin-cuckoocache_tests
[401/409] bitcoin: testing validation_block_tests
[402/409] Running utility command for check-bitcoin-validation_block_tests
[403/409] bitcoin: testing coins_tests
[404/409] Running utility command for check-bitcoin-coins_tests
[405/409] bitcoin: testing transaction_tests
[406/409] Running utility command for check-bitcoin-transaction_tests
Build build-clang timed out after 1200.0s
This revision was landed with ongoing or failed builds.Sep 30 2020, 23:47
This revision was automatically updated to reflect the committed changes.