Page MenuHomePhabricator

Fix an uninitialized const reference warning in hash_tests
ClosedPublic

Authored by Fabien on Nov 18 2020, 09:15.

Details

Summary

Fixes the warning (Clang 11):

warning: variable 'nVersionDummy' is uninitialized when passed as a
const reference argument here [-Wuninitialized-const-reference]
        ::Unserialize(s, VARINT(nVersionDummy));
Test Plan

With Clang 11:

ninja check-bitcoin-hash_tests

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Nov 18 2020, 09:15

Tail of the build log:

[218/415] bitcoin: testing sigcache_tests
[219/415] Running utility command for check-bitcoin-txindex_tests
[220/415] Running utility command for check-bitcoin-feerate_tests
[221/415] Running utility command for check-bitcoin-interfaces_tests
[222/415] Running utility command for check-bitcoin-flatfile_tests
[223/415] Running utility command for check-bitcoin-sigcache_tests
[224/415] bitcoin: testing dstencode_tests
[225/415] bitcoin: testing script_standard_tests
[226/415] Running utility command for check-bitcoin-script_standard_tests
[227/415] Running utility command for check-bitcoin-dstencode_tests
[228/415] bitcoin: testing descriptor_tests
[229/415] bitcoin: testing ismine_tests
[230/415] Running utility command for check-bitcoin-descriptor_tests
[231/415] bitcoin: testing skiplist_tests
[232/415] Running utility command for check-bitcoin-ismine_tests
[233/415] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/paymentservertests.cpp.o
[234/415] bitcoin: testing dbwrapper_tests
[235/415] Running utility command for check-bitcoin-skiplist_tests
[236/415] bitcoin: testing policyestimator_tests
[237/415] Running utility command for check-bitcoin-dbwrapper_tests
[238/415] bitcoin: testing versionbits_tests
[239/415] Running utility command for check-bitcoin-policyestimator_tests
[240/415] Running utility command for check-bitcoin-versionbits_tests
[241/415] pow: testing aserti32d_tests
[242/415] bitcoin: testing db_tests
[243/415] bitcoin: testing mempool_tests
[244/415] bitcoin: testing scriptnum_tests
[245/415] Running utility command for check-bitcoin-mempool_tests
[246/415] Running utility command for check-bitcoin-db_tests
[247/415] bitcoin: testing sanity_tests
[248/415] Running utility command for check-bitcoin-scriptnum_tests
[249/415] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/addressbooktests.cpp.o
[250/415] bitcoin: testing getarg_tests
[251/415] bitcoin: testing rcu_tests
[252/415] bitcoin: testing cashaddrenc_tests
[253/415] bitcoin: testing base32_tests
[254/415] Building CXX object src/qt/test/CMakeFiles/test_bitcoin-qt.dir/wallettests.cpp.o
[255/415] bitcoin: testing coinselector_tests
FAILED: src/test/CMakeFiles/check-bitcoin-coinselector_tests 
cd /work/abc-ci-builds/build-clang-tidy/src/test && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-clang-tidy/test/junit && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-clang-tidy/test/log && /usr/bin/cmake -E env /work/cmake/utils/log-and-print-on-failure.sh /work/abc-ci-builds/build-clang-tidy/test/log/bitcoin-coinselector_tests.log /work/abc-ci-builds/build-clang-tidy/src/test/test_bitcoin --run_test=coinselector_tests --logger=HRF,test_suite:JUNIT,message,bitcoin-coinselector_tests.xml --catch_system_errors=no
Running 4 test cases...
Entering test module "Bitcoin ABC unit tests"
../../src/wallet/test/coinselector_tests.cpp(22): Entering test suite "coinselector_tests"
../../src/wallet/test/coinselector_tests.cpp(149): Entering test case "bnb_search_test"
Segmentation fault (core dumped)
[256/415] Running utility command for check-bitcoin-sanity_tests
[257/415] Running utility command for check-bitcoin-getarg_tests
[258/415] Running utility command for check-bitcoin-rcu_tests
[259/415] Running utility command for check-bitcoin-cashaddrenc_tests
[260/415] Running utility command for check-bitcoin-base32_tests
[261/415] bitcoin: testing denialofservice_tests
[262/415] bitcoin: testing hash_tests
[263/415] bitcoin: testing merkle_tests
[264/415] bitcoin: testing checkdatasig_tests
[265/415] bitcoin: testing sigencoding_tests
[266/415] bitcoin: testing checkqueue_tests
[267/415] bitcoin: testing op_reversebytes_tests
[268/415] bitcoin: testing cuckoocache_tests
ninja: build stopped: subcommand failed.
Build build-clang-tidy failed with exit code 1
This revision is now accepted and ready to land.Nov 18 2020, 10:08
This revision was landed with ongoing or failed builds.Nov 18 2020, 10:10
This revision was automatically updated to reflect the committed changes.