Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up warnings in version3 and master builds. #266

Open
evoskuil opened this issue Mar 22, 2021 · 1 comment
Open

Clean up warnings in version3 and master builds. #266

evoskuil opened this issue Mar 22, 2021 · 1 comment
Assignees

Comments

@evoskuil
Copy link
Member

evoskuil commented Mar 22, 2021

libbitcoin-system is clean, with the exception of 4 unused function warnings by 2 older compilers, which are bogus.

vc++141 is clean, but vc140 is not and vc120 has a break resulting from a dependency update (boost?).

@evoskuil evoskuil added the build label Mar 22, 2021
@evoskuil evoskuil self-assigned this Mar 22, 2021
@evoskuil
Copy link
Member Author

libsecp256k1:
https://travis-ci.org/github/libbitcoin/libbitcoin-database/jobs/763518509#L626
./src/secp256k1.c:79:9: warning: missing field 'pre_g_128' initializer
https://travis-ci.org/github/libbitcoin/libbitcoin-database/jobs/763518509#L630
./src/secp256k1.c:80:9: warning: missing field 'blind' initializer


https://travis-ci.org/github/libbitcoin/libbitcoin-consensus/jobs/763517820#L799
./src/clone/serialize.h:632:6: warning: extra ‘;’ [-Wpedantic]
https://travis-ci.org/github/libbitcoin/libbitcoin-consensus/jobs/763517820#L814
src/clone/crypto/sha256.cpp:465:6: warning: ‘bool {anonymous}::SelfTest()’ defined but not used [-Wunused-function]
assert(SelfTest());
If NDEBUG is not defined, then assert checks if its argument (which must have scalar type) compares equal to zero.
https://travis-ci.org/github/libbitcoin/libbitcoin-consensus/jobs/763517820#L832
src/clone/script/interpreter.cpp:429:1: warning: control reaches end of non-void function [-Wreturn-type]
{
    switch (sigversion) {
    case SigVersion::BASE:
    case SigVersion::WITNESS_V0:
        return EvalChecksigPreTapscript(sig, pubkey, pbegincodehash, pend, flags, checker, sigversion, serror, success);
    case SigVersion::TAPSCRIPT:
        return EvalChecksigTapscript(sig, pubkey, execdata, flags, checker, sigversion, serror, success);
    case SigVersion::TAPROOT:
        // Key path spending in Taproot has no script, so this is unreachable.
        break;
    }
    assert(false);
}
https://travis-ci.org/github/libbitcoin/libbitcoin-consensus/jobs/763517820#L837
src/clone/script/interpreter.cpp:1542:69: warning: ‘ext_flag’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    uint8_t ext_flag, key_version;
    switch (sigversion) {
    case SigVersion::TAPROOT:
        ext_flag = 0;
        // key_version is not used and left uninitialized.
        break;
    case SigVersion::TAPSCRIPT:
        ext_flag = 1;
        // key_version must be 0 for now, representing the current version of
        // 32-byte public keys in the tapscript signature opcode execution.
        // An upgradable public key version (with a size not 32-byte) may
        // request a different key_version with a new sigversion.
        key_version = 0;
        break;
    default:
        assert(false);
    }


https://travis-ci.org/github/libbitcoin/libbitcoin-database/jobs/763518508#L1503
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/ext/new_allocator.h:124:29: warning: 
destructor called on non-final 'libbitcoin::database::accessor' that has
virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
https://travis-ci.org/github/libbitcoin/libbitcoin-database/jobs/763518508#L1309
src/databases/filter_database.cpp:43:23: warning: unused variable
'filter_header_size' [-Wunused-const-variable]
static constexpr auto filter_header_size = hash_size;
https://travis-ci.org/github/libbitcoin/libbitcoin-database/jobs/763518508#L1464
test/databases/block_database.cpp:362:11: warning: unused variable 'header0'
[-Wunused-variable]


https://travis-ci.org/github/libbitcoin/libbitcoin-blockchain/jobs/763518687#L1926
./include/bitcoin/blockchain/pools/transaction_entry.hpp:135:14: warning: 
private field 'locktime_' is not used [-Wunused-private-field]
https://travis-ci.org/github/libbitcoin/libbitcoin-blockchain/jobs/763518687#L1930
./include/bitcoin/blockchain/pools/transaction_entry.hpp:136:14: warning: 
private field 'min_spendable_height_' is not used [-Wunused-private-field]
https://travis-ci.org/github/libbitcoin/libbitcoin-blockchain/jobs/763518687#L1954
./include/bitcoin/blockchain/validate/validate_transaction.hpp:62:16: warning: 
private field 'retarget_' is not used [-Wunused-private-field]


https://travis-ci.org/github/libbitcoin/libbitcoin-node/jobs/763518896#L2436
src/full_node.cpp:281:17: warning: unused variable 'times' [-Wunused-variable]
https://travis-ci.org/github/libbitcoin/libbitcoin-node/jobs/763518896#L2440
./include/bitcoin/node/full_node.hpp:136:20: warning: private field
'protocol_maximum_' is not used [-Wunused-private-field]
https://travis-ci.org/github/libbitcoin/libbitcoin-node/jobs/763518896#L2452
./include/bitcoin/node/protocols/protocol_compact_filter_out.hpp:73:16: warning: 
private field 'node_' is not used [-Wunused-private-field]
https://travis-ci.org/github/libbitcoin/libbitcoin-node/jobs/763518896#L2468
./include/bitcoin/node/utility/reservation.hpp:152:17: warning: private field
'maximum_deviation_' is not used [-Wunused-private-field]
https://travis-ci.org/github/libbitcoin/libbitcoin-node/jobs/763518896#L2475
console/executor.cpp:49:19: warning: unused variable 'mode' [-Wunused-const-variable]


One for every command:
https://travis-ci.org/github/libbitcoin/libbitcoin-explorer/jobs/763519126#L2516
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/ext/new_allocator.h:124:29: warning: 
destructor called on non-final
'libbitcoin::explorer::commands::address_decode' that has virtual
functions but non-virtual destructor [-Wdelete-non-virtual-dtor]


https://travis-ci.org/github/libbitcoin/libbitcoin-server/jobs/763519248#L3442
src/interface/blockchain.cpp:42:25: warning: unused variable 'index_size'
https://travis-ci.org/github/libbitcoin/libbitcoin-server/jobs/763519248#L3466
./include/bitcoin/server/workers/notification_worker.hpp:128:16: warning: 
private field 'secure_' is not used [-Wunused-private-field]
https://travis-ci.org/github/libbitcoin/libbitcoin-server/jobs/763519248#L3473
console/executor.cpp:51:19: warning: unused variable 'mode' [-Wunused-const-variable]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant