tidy: enable cppcoreguidelines-pro-type-member-init #27315

issue fanquake openend this issue on March 23, 2023
  1. fanquake commented at 2:42 pm on March 23, 2023: member

    https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines/pro-type-member-init.html

    The check flags user-defined constructor definitions that do not initialize all fields that would be left in an undefined state by default construction, e.g. builtins, pointers and record types without user-provided default constructors containing at least one such type. If these fields aren’t initialized, the constructor will leave some of the memory in an undefined state.

    Have been multiple calls to add this, i.e #26762 (comment).

    Also related to #26296.

  2. maflcko commented at 8:12 pm on March 23, 2023: member

    This indeed looks more involved than I initially thought. Report on the cpp files only:

     0diff --git a/src/.clang-tidy b/src/.clang-tidy
     1index b2c1b49..b657dc7 100644
     2--- a/src/.clang-tidy
     3+++ b/src/.clang-tidy
     4@@ -1,5 +1,6 @@
     5 Checks: '
     6 -*,
     7+cppcoreguidelines-pro-type-member-init,
     8 bugprone-argument-comment,
     9 bugprone-use-after-move,
    10 misc-unused-using-decls,
    11@@ -15,6 +16,7 @@ readability-redundant-string-init,
    12 '
    13 WarningsAsErrors: '*'
    14 CheckOptions:
    15+ - key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
    16+   value: true
    17  - key: performance-move-const-arg.CheckTriviallyCopyableMove
    18    value: false
    19-HeaderFilterRegex: '.'
    
      0/bitcoin-core/src/test/fuzz/crypto_common.cpp:26:5: error: uninitialized record type: 'writele16_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
      1    std::array<uint8_t, 2> writele16_arr;
      2--
      3/bitcoin-core/src/test/fuzz/crypto_common.cpp:30:5: error: uninitialized record type: 'writele32_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
      4    std::array<uint8_t, 4> writele32_arr;
      5--
      6/bitcoin-core/src/test/fuzz/crypto_common.cpp:34:5: error: uninitialized record type: 'writele64_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
      7    std::array<uint8_t, 8> writele64_arr;
      8--
      9/bitcoin-core/src/test/fuzz/crypto_common.cpp:38:5: error: uninitialized record type: 'writebe32_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     10    std::array<uint8_t, 4> writebe32_arr;
     11--
     12/bitcoin-core/src/test/fuzz/crypto_common.cpp:42:5: error: uninitialized record type: 'writebe64_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     13    std::array<uint8_t, 8> writebe64_arr;
     14--
     15/bitcoin-core/src/test/fuzz/crypto_common.cpp:47:5: error: uninitialized record type: 'readle16_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     16    std::array<uint8_t, 2> readle16_arr;
     17--
     18/bitcoin-core/src/test/fuzz/crypto_common.cpp:52:5: error: uninitialized record type: 'readle32_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     19    std::array<uint8_t, 4> readle32_arr;
     20--
     21/bitcoin-core/src/test/fuzz/crypto_common.cpp:57:5: error: uninitialized record type: 'readle64_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     22    std::array<uint8_t, 8> readle64_arr;
     23--
     24/bitcoin-core/src/test/fuzz/crypto_common.cpp:62:5: error: uninitialized record type: 'readbe32_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     25    std::array<uint8_t, 4> readbe32_arr;
     26--
     27/bitcoin-core/src/test/fuzz/crypto_common.cpp:67:5: error: uninitialized record type: 'readbe64_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     28    std::array<uint8_t, 8> readbe64_arr;
     29--
     30/bitcoin-core/src/test/fuzz/miniscript.cpp:136:12: error: constructor does not initialize these fields: is_hash [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     31    struct Key {
     32--
     33/bitcoin-core/src/test/fuzz/miniscript.cpp:221:8: error: constructor does not initialize these fields: test_data [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     34struct CheckerContext: BaseSignatureChecker {
     35--
     36/bitcoin-core/src/httpserver.cpp:681:9: error: uninitialized record type: 'params_q' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     37        struct evkeyvalq params_q;
     38--
     39/bitcoin-core/src/compat/stdin.cpp:32:5: error: uninitialized record type: 'tty' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     40    struct termios tty;
     41--
     42/bitcoin-core/src/compat/stdin.cpp:60:5: error: uninitialized record type: 'fds' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     43    struct pollfd fds;
     44--
     45/bitcoin-core/src/bench/addrman.cpp:35:9: error: uninitialized record type: 'addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     46        in6_addr addr;
     47--
     48wallet/bdb.cpp:118:1: error: constructor does not initialize these fields: fDbEnvInit, fMockDb [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     49BerkeleyEnvironment::BerkeleyEnvironment(const fs::path& dir_path, bool use_shared_memory) : strPath(fs::PathToString(dir_path)), m_use_shared_memory(use_shared_memory)
     50--
     51wallet/bdb.cpp:659:1: error: constructor does not initialize these fields: m_cursor [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     52BerkeleyCursor::BerkeleyCursor(BerkeleyDatabase& database)
     53--
     54/bitcoin-core/src/index/coinstatsindex.cpp:31:8: error: constructor does not initialize these fields: transaction_output_count, bogo_size, total_amount, total_subsidy, total_unspendable_amount, total_prevout_spent_amount, total_new_outputs_ex_coinbase_amount, total_coinbase_amount, total_unspendables_genesis_block, total_unspendables_bip30, total_unspendables_scripts, total_unspendables_unclaimed_rewards [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     55struct DBVal {
     56--
     57/bitcoin-core/src/httprpc.cpp:36:9: error: uninitialized record type: 'tv' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     58        struct timeval tv;
     59--
     60/bitcoin-core/src/util/system.cpp:1189:5: error: uninitialized record type: 'limitFD' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     61    struct rlimit limitFD;
     62--
     63/bitcoin-core/src/torcontrol.cpp:141:5: error: uninitialized record type: 'control_address' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     64    struct sockaddr_storage control_address;
     65--
     66/bitcoin-core/src/torcontrol.cpp:701:5: error: uninitialized record type: 'onion_service_target' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     67    struct in_addr onion_service_target;
     68--
     69blockencodings.cpp:19:1: error: constructor does not initialize these fields: shorttxidk0, shorttxidk1 [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     70CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs(const CBlock& block) :
     71--
     72logging.cpp:145:8: error: constructor does not initialize these fields: flag [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     73struct CLogCategoryDesc {
     74--
     75/bitcoin-core/src/script/standard.cpp:278:9: error: uninitialized record type: 'unk' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     76        WitnessUnknown unk;
     77--
     78/bitcoin-core/src/script/standard.cpp:514:12: error: constructor does not initialize these fields: inner [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     79    struct TreeNode {
     80--
     81/bitcoin-core/src/net.cpp:426:5: error: uninitialized record type: 'sockaddr_bind' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     82    struct sockaddr_storage sockaddr_bind;
     83--
     84/bitcoin-core/src/net.cpp:941:5: error: uninitialized record type: 'sockaddr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     85    struct sockaddr_storage sockaddr;
     86--
     87/bitcoin-core/src/net.cpp:2110:5: error: uninitialized record type: 'sockaddr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     88    struct sockaddr_storage sockaddr;
     89--
     90/bitcoin-core/src/net.cpp:2240:1: error: constructor does not initialize these fields: nMaxOutboundLimit, m_peer_connect_timeout, nLocalServices, nMaxConnections, m_max_outbound_full_relay, m_max_outbound_block_relay, nMaxAddnode, nMaxFeeler, m_max_outbound, m_use_addrman_outgoing, m_client_interface, m_msgproc, m_banman, fMsgProcWake, m_try_another_outbound_peer [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     91CConnman::CConnman(uint64_t nSeed0In, uint64_t nSeed1In, AddrMan& addrman_in,
     92--
     93/bitcoin-core/src/net.cpp:2292:9: error: uninitialized record type: 'inaddr_any' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     94        struct in_addr inaddr_any;
     95--
     96common/bloom.cpp:162:1: error: constructor does not initialize these fields: nEntriesThisGeneration, nGeneration, nTweak [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     97CRollingBloomFilter::CRollingBloomFilter(const unsigned int nElements, const double fpRate)
     98--
     99/bitcoin-core/src/test/blockencodings_tests.cpp:121:5: error: constructor does not initialize these fields: nonce [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    100    explicit TestHeaderAndShortIDs(const CBlockHeaderAndShortTxIDs& orig) {
    101--
    102/bitcoin-core/src/key_io.cpp:182:13: error: uninitialized record type: 'unk' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    103            WitnessUnknown unk;
    104--
    105/bitcoin-core/src/wallet/interfaces.cpp:89:5: error: uninitialized record type: 'result' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    106    WalletTxStatus result;
    107--
    108crypto/aes.cpp:13:1: error: constructor does not initialize these fields: ctx [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    109AES256Encrypt::AES256Encrypt(const unsigned char key[32])
    110--
    111crypto/aes.cpp:28:1: error: constructor does not initialize these fields: ctx [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    112AES256Decrypt::AES256Decrypt(const unsigned char key[32])
    113--
    114/bitcoin-core/src/randomenv.cpp:382:5: error: uninitialized record type: 'name' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    115    struct utsname name;
    116--
    117/bitcoin-core/src/test/serialize_tests.cpp:17:7: error: constructor does not initialize these fields: intval, boolval [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    118class CSerializeMethodsTestSingle
    119--
    120/bitcoin-core/src/test/serialize_tests.cpp:26:5: error: constructor does not initialize these fields: intval, boolval [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    121    CSerializeMethodsTestSingle() = default;
    122--
    123/bitcoin-core/src/validation.cpp:569:9: error: constructor does not initialize these fields: m_vsize, m_base_fees, m_modified_fees [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    124        explicit Workspace(const CTransactionRef& ptx) : m_ptx(ptx), m_hash(ptx->GetHash()) {}
    125--
    126/bitcoin-core/src/test/fuzz/txrequest.cpp:91:12: error: constructor does not initialize these fields: m_time, m_sequence, m_preferred, m_is_wtxid, m_priority [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    127    struct Announcement
    128--
    129/bitcoin-core/src/util/syscall_sandbox.cpp:830:5: error: uninitialized record type: 'groups' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    130    std::array<gid_t, 1> groups;
    131--
    132/bitcoin-core/src/init.cpp:380:5: error: uninitialized record type: 'sa' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    133    struct sigaction sa;
    134--
    135/bitcoin-core/src/support/lockedpool.cpp:270:5: error: uninitialized record type: 'rlim' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    136    struct rlimit rlim;
    137--
    138/bitcoin-core/src/netbase.cpp:488:5: error: uninitialized record type: 'sockaddr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    139    struct sockaddr_storage sockaddr;
    140--
    141/bitcoin-core/src/netbase.cpp:549:5: error: uninitialized record type: 'sockaddr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    142    struct sockaddr_storage sockaddr;
    143--
    144/bitcoin-core/src/bench/wallet_create_tx.cpp:22:8: error: constructor does not initialize these fields: prev_block_time, tip_height [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    145struct TipBlock
    146--
    147/bitcoin-core/src/test/fuzz/versionbits.cpp:225:5: error: uninitialized record type: 'last_stats' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    148    BIP9Stats last_stats;
    149--
    150node/miner.cpp:66:1: error: constructor does not initialize these fields: nBlockWeight, nBlockTx, nBlockSigOpsCost, nFees, nHeight, m_lock_time_cutoff [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    151BlockAssembler::BlockAssembler(Chainstate& chainstate, const CTxMemPool* mempool, const Options& options)
    152--
    153/bitcoin-core/src/test/net_tests.cpp:54:5: error: uninitialized record type: 'ipv4Addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    154    in_addr ipv4Addr;
    155--
    156/bitcoin-core/src/test/net_tests.cpp:612:5: error: uninitialized record type: 'raw_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    157    in_addr raw_addr;
    158--
    159/bitcoin-core/src/test/net_tests.cpp:617:9: error: uninitialized record type: 'lsi' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    160        LocalServiceInfo lsi;
    161--
    162/bitcoin-core/src/test/net_tests.cpp:624:5: error: uninitialized record type: 'ipv4AddrPeer' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    163    in_addr ipv4AddrPeer;
    164--
    165/bitcoin-core/src/test/net_tests.cpp:639:5: error: uninitialized record type: 'ipv6AddrLocal' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    166    in6_addr ipv6AddrLocal;
    167--
    168/bitcoin-core/src/test/net_tests.cpp:674:5: error: uninitialized record type: 'peer_us_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    169    in_addr peer_us_addr;
    170--
    171/bitcoin-core/src/test/net_tests.cpp:679:5: error: uninitialized record type: 'peer_out_in_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    172    in_addr peer_out_in_addr;
    173--
    174/bitcoin-core/src/test/net_tests.cpp:700:5: error: uninitialized record type: 'peer_in_in_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    175    in_addr peer_in_in_addr;
    176--
    177/bitcoin-core/src/test/net_tests.cpp:771:5: error: uninitialized record type: 'sa' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    178    struct sockaddr_in sa;
    179--
    180/bitcoin-core/src/test/net_tests.cpp:824:5: error: uninitialized record type: 'peer_us_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    181    in_addr peer_us_addr;
    182--
    183/bitcoin-core/src/test/net_tests.cpp:829:5: error: uninitialized record type: 'peer_in_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    184    in_addr peer_in_addr;
    185--
    186/bitcoin-core/src/test/bip32_tests.cpp:19:8: error: constructor does not initialize these fields: nChild [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    187struct TestDerivation {
    188--
    189/bitcoin-core/src/rpc/blockchain.cpp:65:8: error: constructor does not initialize these fields: height [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    190struct CUpdatedBlock
    191--
    192dbwrapper.cpp:130:1: error: constructor does not initialize these fields: pdb [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    193CDBWrapper::CDBWrapper(const DBParams& params)
    194--
    195random.cpp:623:1: error: constructor does not initialize these fields: bitbuf [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    196FastRandomContext::FastRandomContext(const uint256& seed) noexcept : requires_seed(false), bitbuf_size(0)
    197--
    198random.cpp:674:1: error: constructor does not initialize these fields: bitbuf [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    199FastRandomContext::FastRandomContext(bool fDeterministic) noexcept : requires_seed(!fDeterministic), bitbuf_size(0)
    200--
    201/bitcoin-core/src/test/script_standard_tests.cpp:252:5: error: uninitialized record type: 'unk' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    202    WitnessUnknown unk;
    203--
    204/bitcoin-core/src/node/caches.cpp:17:5: error: uninitialized record type: 'sizes' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    205    CacheSizes sizes;
    206--
    207/bitcoin-core/src/test/denialofservice_tests.cpp:31:5: error: uninitialized record type: 's' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    208    struct in_addr s;
    209--
    210/bitcoin-core/src/test/denialofservice_tests.cpp:289:5: error: uninitialized record type: 'nodes' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    211    std::array<CNode*, 3> nodes;
    212--
    213/bitcoin-core/src/test/fuzz/asmap.cpp:56:9: error: uninitialized record type: 'ipv4' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    214        in_addr ipv4;
    215--
    216/bitcoin-core/src/util/time.cpp:50:5: error: uninitialized record type: 'epoch' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    217    struct tm epoch;
    218--
    219/bitcoin-core/src/util/time.cpp:113:5: error: uninitialized record type: 'ts' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    220    struct tm ts;
    221--
    222/bitcoin-core/src/util/time.cpp:126:5: error: uninitialized record type: 'ts' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    223    struct tm ts;
    224--
    225/bitcoin-core/src/util/time.cpp:140:5: error: uninitialized record type: 'timeout' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    226    struct timeval timeout;
    227--
    228/bitcoin-core/src/fs.cpp:69:5: error: uninitialized record type: 'lock' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    229    struct flock lock;
    
  3. fanquake commented at 11:41 am on March 22, 2024: member

    Current output:

      0clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/rpc/blockchain.cpp
      1rpc/blockchain.cpp:65:8: error: constructor does not initialize these fields: height [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
      2   65 | struct CUpdatedBlock
      3      |        ^
      4   66 | {
      5   67 |     uint256 hash;
      6   68 |     int height;
      7      |               
      8      |               {}
      9834 warnings generated.
     10test/denialofservice_tests.cpp:31:5: error: uninitialized record type: 's' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     11   31 |     struct in_addr s;
     12      |     ^               
     13      |                     {}
     14test/denialofservice_tests.cpp:318:5: error: uninitialized record type: 'nodes' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     15  318 |     std::array<CNode*, 3> nodes;
     16      |     ^                          
     17      |                                {}
     181073 warnings generated.
     19blockencodings.cpp:20:1: error: constructor does not initialize these fields: shorttxidk0, shorttxidk1 [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     20   20 | CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs(const CBlock& block) :
     21      | ^
     22qt/addressbookpage.cpp:60:1: error: constructor does not initialize these fields: proxyModel [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     23   60 | AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode, Tabs _tab, QWidget *parent) :
     24      | ^
     25800 warnings generated.
     26clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/test/fuzz/crypto_poly1305.cpp
     27test/fuzz/crypto_poly1305.cpp:48:5: error: uninitialized record type: 'tag_full' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     28   48 |     std::array<std::byte, Poly1305::TAGLEN> tag_split, tag_full;
     29      |     ^                                                          
     30      |                                                                {}
     31test/fuzz/crypto_poly1305.cpp:48:5: error: uninitialized record type: 'tag_split' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     32   48 |     std::array<std::byte, Poly1305::TAGLEN> tag_split, tag_full;
     33      |     ^                                                
     34      |                                                      {}
     35559 warnings generated.
     36test/serialize_tests.cpp:18:7: error: constructor does not initialize these fields: intval, boolval [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     37   18 | class CSerializeMethodsTestSingle
     38      |       ^
     39   19 | {
     40   20 | protected:
     41   21 |     int intval;
     42      |               
     43      |               {}
     44   22 |     bool boolval;
     45      |                 
     46      |                 {}
     47test/serialize_tests.cpp:27:5: error: constructor does not initialize these fields: intval, boolval [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     48   27 |     CSerializeMethodsTestSingle() = default;
     49      |     ^
     50test/serialize_tests.cpp:189:5: error: uninitialized record type: 'array2' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     51  189 |     std::array<uint8_t, 32> array2;
     52      |     ^                             
     53      |                                   {}
     54test/serialize_tests.cpp:261:9: error: uninitialized record type: 'out' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     55  261 |         std::array<std::byte, 2> out;
     56      |         ^                           
     57      |                                     {}
     58863 warnings generated.
     59clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/netbase.cpp
     60netbase.cpp:619:5: error: uninitialized record type: 'sockaddr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     61  619 |     struct sockaddr_storage sockaddr;
     62      |     ^                               
     63      |                                     {}
     64netbase.cpp:651:5: error: uninitialized record type: 'addrun' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     65  651 |     struct sockaddr_un addrun;
     66      |     ^                        
     67      |                              {}
     68qt/optionsmodel.cpp:153:1: error: constructor does not initialize these fields: m_show_tray_icon, fMinimizeToTray, fMinimizeOnClose, m_display_bitcoin_unit, fCoinControlFeatures, m_sub_fee_from_amount, m_enable_psbt_controls, m_mask_values [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     69  153 | OptionsModel::OptionsModel(interfaces::Node& node, QObject *parent) :
     70      | ^
     71clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/key.cpp
     72key.cpp:340:5: error: uninitialized record type: 'encoded_pubkey' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     73  340 |     std::array<std::byte, EllSwiftPubKey::size()> encoded_pubkey;
     74      |     ^                                                           
     75      |                                                                 {}
     76util/time.cpp:50:5: error: uninitialized record type: 'epoch' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     77   50 |     struct tm epoch;
     78      |     ^              
     79      |                    {}
     80util/time.cpp:100:5: error: uninitialized record type: 'ts' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     81  100 |     struct tm ts;
     82      |     ^           
     83      |                 {}
     84util/time.cpp:113:5: error: uninitialized record type: 'ts' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     85  113 |     struct tm ts;
     86      |     ^           
     87      |                 {}
     88util/time.cpp:127:5: error: uninitialized record type: 'timeout' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     89  127 |     struct timeval timeout;
     90      |     ^                     
     91      |                           {}
     92qt/initexecutor.cpp:46:13: error: uninitialized record type: 'tip_info' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     93   46 |             interfaces::BlockAndHeaderTipInfo tip_info;
     94      |             ^                                         
     95      |                                                       {}
     96qt/transactiontablemodel.cpp:63:8: error: constructor does not initialize these fields: status, showTransaction [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
     97   63 | struct TransactionNotification
     98      |        ^
     99qt/transactiontablemodel.cpp:223:13: error: uninitialized record type: 'wtx' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    100  223 |             interfaces::WalletTxStatus wtx;
    101      |             ^                             
    102      |                                           {}
    103torcontrol.cpp:153:5: error: uninitialized record type: 'control_address' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    104  153 |     struct sockaddr_storage control_address;
    105      |     ^                                      
    106      |                                            {}
    107torcontrol.cpp:712:5: error: uninitialized record type: 'onion_service_target' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    108  712 |     struct in_addr onion_service_target;
    109      |     ^                                  
    110      |                                        {}
    111test/fuzz/versionbits.cpp:226:5: error: uninitialized record type: 'last_stats' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    112  226 |     BIP9Stats last_stats;
    113      |     ^                   
    114      |                         {}
    115wallet/bdb.cpp:132:1: error: constructor does not initialize these fields: fDbEnvInit, fMockDb [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    116  132 | BerkeleyEnvironment::BerkeleyEnvironment(const fs::path& dir_path, bool use_shared_memory) : strPath(fs::PathToString(dir_path)), m_use_shared_memory(use_shared_memory)
    117      | ^
    118wallet/bdb.cpp:715:1: error: constructor does not initialize these fields: m_cursor [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    119  715 | BerkeleyCursor::BerkeleyCursor(BerkeleyDatabase& database, const BerkeleyBatch& batch, Span<const std::byte> prefix)
    120      | ^
    121test/fuzz/txrequest.cpp:91:12: error: constructor does not initialize these fields: m_time, m_sequence, m_preferred, m_is_wtxid, m_priority [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    122   91 |     struct Announcement
    123      |            ^
    124   92 |     {
    125   93 |         std::chrono::microseconds m_time;
    126      |                                         
    127      |                                         {}
    128   94 |         uint64_t m_sequence;
    129      |                            
    130      |                            {}
    131   95 |         State m_state{State::NOTHING};
    132   96 |         bool m_preferred;
    133      |                         
    134      |                         {}
    135   97 |         bool m_is_wtxid;
    136      |                        
    137      |                        {}
    138   98 |         uint64_t m_priority; //!< Precomputed priority.
    139      |                            
    140      |                            {}
    141test/net_peer_connection_tests.cpp:41:5: error: uninitialized record type: 's' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    142   41 |     struct in_addr s;
    143      |     ^               
    144      |                     {}
    1451010 warnings generated.
    146test/fuzz/miniscript.cpp:193:12: error: constructor does not initialize these fields: is_hash [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    147  193 |     struct Key {
    148      |            ^
    149  194 |         bool is_hash;
    150      |                     
    151      |                     {}
    152qt/walletframe.cpp:29:1: error: constructor does not initialize these fields: clientModel, bOutOfSync [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    153   29 | WalletFrame::WalletFrame(const PlatformStyle* _platformStyle, QWidget* parent)
    154      | ^
    155clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/init.cpp
    156init.cpp:416:5: error: uninitialized record type: 'sa' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    157  416 |     struct sigaction sa;
    158      |     ^                  
    159      |                        {}
    160wallet/interfaces.cpp:92:5: error: uninitialized record type: 'result' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    161   92 |     WalletTxStatus result;
    162      |     ^                    
    163      |                          {}
    164qt/bantablemodel.cpp:36:7: error: constructor does not initialize these fields: sortOrder [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    165   36 | class BanTablePriv
    166      |       ^
    167node/caches.cpp:17:5: error: uninitialized record type: 'sizes' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    168   17 |     CacheSizes sizes;
    169      |     ^               
    170      |                     {}
    171test/blockencodings_tests.cpp:121:5: error: constructor does not initialize these fields: nonce [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    172  117 |     uint64_t nonce;
    173      |                   
    174      |                   {}
    175  118 |     std::vector<uint64_t> shorttxids;
    176  119 |     std::vector<PrefilledTransaction> prefilledtxn;
    177  120 | 
    178  121 |     explicit TestHeaderAndShortIDs(const CBlockHeaderAndShortTxIDs& orig) {
    179      |     ^
    180util/fs_helpers.cpp:169:5: error: uninitialized record type: 'limitFD' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    181  169 |     struct rlimit limitFD;
    182      |     ^                    
    183      |                          {}
    184net.cpp:379:5: error: uninitialized record type: 'sockaddr_bind' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    185  379 |     struct sockaddr_storage sockaddr_bind;
    186      |     ^                                    
    187      |                                          {}
    188net.cpp:682:1: error: constructor does not initialize these fields: in_data, nHdrPos, nDataPos [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    189  682 | V1Transport::V1Transport(const NodeId node_id) noexcept
    190      | ^
    191net.cpp:1690:5: error: uninitialized record type: 'sockaddr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    192 1690 |     struct sockaddr_storage sockaddr;
    193      |     ^                               
    194      |                                     {}
    195net.cpp:2970:5: error: uninitialized record type: 'sockaddr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    196 2970 |     struct sockaddr_storage sockaddr;
    197      |     ^                               
    198      |                                     {}
    199net.cpp:3097:1: error: constructor does not initialize these fields: nMaxOutboundLimit, m_peer_connect_timeout, nLocalServices, m_max_automatic_connections, m_max_outbound_full_relay, m_max_outbound_block_relay, m_max_automatic_outbound, m_max_inbound, m_use_addrman_outgoing, m_client_interface, m_msgproc, m_banman, fMsgProcWake, whitelist_forcerelay, whitelist_relay [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    200 3097 | CConnman::CConnman(uint64_t nSeed0In, uint64_t nSeed1In, AddrMan& addrman_in,
    201      | ^
    202net.cpp:3160:9: error: uninitialized record type: 'inaddr_any' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    203 3160 |         struct in_addr inaddr_any;
    204      |         ^                        
    205      |                                  {}
    206qt/addresstablemodel.cpp:22:8: error: constructor does not initialize these fields: type [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    207   22 | struct AddressTableEntry
    208      |        ^
    209test/fuzz/asmap.cpp:56:9: error: uninitialized record type: 'ipv4' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    210   56 |         in_addr ipv4;
    211      |         ^           
    212      |                     {}
    213clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/streams.cpp
    214streams.cpp:54:9: error: uninitialized record type: 'buf' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    215   54 |         std::array<std::byte, 4096> buf;
    216      |         ^                              
    217      |                                        {}
    218test/fuzz/crypto_common.cpp:26:5: error: uninitialized record type: 'writele16_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    219   26 |     std::array<uint8_t, 2> writele16_arr;
    220      |     ^                                   
    221      |                                         {}
    222test/fuzz/crypto_common.cpp:30:5: error: uninitialized record type: 'writele32_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    223   30 |     std::array<uint8_t, 4> writele32_arr;
    224      |     ^                                   
    225      |                                         {}
    226test/fuzz/crypto_common.cpp:34:5: error: uninitialized record type: 'writele64_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    227   34 |     std::array<uint8_t, 8> writele64_arr;
    228      |     ^                                   
    229      |                                         {}
    230test/fuzz/crypto_common.cpp:38:5: error: uninitialized record type: 'writebe32_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    231   38 |     std::array<uint8_t, 4> writebe32_arr;
    232      |     ^                                   
    233      |                                         {}
    234test/fuzz/crypto_common.cpp:42:5: error: uninitialized record type: 'writebe64_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    235   42 |     std::array<uint8_t, 8> writebe64_arr;
    236      |     ^                                   
    237      |                                         {}
    238test/fuzz/crypto_common.cpp:47:5: error: uninitialized record type: 'readle16_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    239   47 |     std::array<uint8_t, 2> readle16_arr;
    240      |     ^                                  
    241      |                                        {}
    242test/fuzz/crypto_common.cpp:52:5: error: uninitialized record type: 'readle32_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    243   52 |     std::array<uint8_t, 4> readle32_arr;
    244      |     ^                                  
    245      |                                        {}
    246test/fuzz/crypto_common.cpp:57:5: error: uninitialized record type: 'readle64_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    247   57 |     std::array<uint8_t, 8> readle64_arr;
    248      |     ^                                  
    249      |                                        {}
    250test/fuzz/crypto_common.cpp:62:5: error: uninitialized record type: 'readbe32_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    251   62 |     std::array<uint8_t, 4> readbe32_arr;
    252      |     ^                                  
    253      |                                        {}
    254test/fuzz/crypto_common.cpp:67:5: error: uninitialized record type: 'readbe64_arr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    255   67 |     std::array<uint8_t, 8> readbe64_arr;
    256      |     ^                                  
    257      |                                        {}
    258common/bloom.cpp:162:1: error: constructor does not initialize these fields: nEntriesThisGeneration, nGeneration, nTweak [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    259  162 | CRollingBloomFilter::CRollingBloomFilter(const unsigned int nElements, const double fpRate)
    260      | ^
    261qt/transactionview.cpp:43:1: error: constructor does not initialize these fields: dateRangeWidget, dateFrom, dateTo [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    262   43 | TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *parent)
    263      | ^
    264test/bip32_tests.cpp:19:8: error: constructor does not initialize these fields: nChild [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    265   19 | struct TestDerivation {
    266      |        ^
    267   20 |     std::string pub;
    268   21 |     std::string prv;
    269   22 |     unsigned int nChild;
    270      |                        
    271      |                        {}
    272crypto/aes.cpp:13:1: error: constructor does not initialize these fields: ctx [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    273   13 | AES256Encrypt::AES256Encrypt(const unsigned char key[32])
    274      | ^
    275crypto/aes.cpp:28:1: error: constructor does not initialize these fields: ctx [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    276   28 | AES256Decrypt::AES256Decrypt(const unsigned char key[32])
    277      | ^
    278node/miner.cpp:67:1: error: constructor does not initialize these fields: nBlockWeight, nBlockTx, nBlockSigOpsCost, nFees, nHeight, m_lock_time_cutoff [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    279   67 | BlockAssembler::BlockAssembler(Chainstate& chainstate, const CTxMemPool* mempool, const Options& options)
    280      | ^
    281bench/bip324_ecdh.cpp:20:5: error: uninitialized record type: 'key_data' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    282   20 |     std::array<std::byte, 32> key_data;
    283      |     ^                                 
    284      |                                       {}
    285bench/bip324_ecdh.cpp:21:5: error: uninitialized record type: 'our_ellswift_data' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    286   21 |     std::array<std::byte, EllSwiftPubKey::size()> our_ellswift_data;
    287      |     ^                                                              
    288      |                                                                    {}
    289bench/bip324_ecdh.cpp:22:5: error: uninitialized record type: 'their_ellswift_data' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    290   22 |     std::array<std::byte, EllSwiftPubKey::size()> their_ellswift_data;
    291      |     ^                                                                
    292      |                                                                      {}
    293bench/wallet_create_tx.cpp:21:8: error: constructor does not initialize these fields: prev_block_time, tip_height [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    294   21 | struct TipBlock
    295      |        ^
    296   22 | {
    297   23 |     uint256 prev_block_hash;
    298   24 |     int64_t prev_block_time;
    299      |                            
    300      |                            {}
    301   25 |     int tip_height;
    302      |                   
    303      |                   {}
    304compat/stdin.cpp:32:5: error: uninitialized record type: 'tty' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    305   32 |     struct termios tty;
    306      |     ^                 
    307      |                       {}
    308compat/stdin.cpp:60:5: error: uninitialized record type: 'fds' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    309   60 |     struct pollfd fds;
    310      |     ^                
    311      |                      {}
    312qt/coincontroldialog.cpp:43:1: error: constructor does not initialize these fields: sortColumn, sortOrder, contextMenuItem [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    313   43 | CoinControlDialog::CoinControlDialog(CCoinControl& coin_control, WalletModel* _model, const PlatformStyle *_platformStyle, QWidget *parent) :
    314      | ^
    315test/net_tests.cpp:55:5: error: uninitialized record type: 'ipv4Addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    316   55 |     in_addr ipv4Addr;
    317      |     ^               
    318      |                     {}
    319test/net_tests.cpp:609:5: error: uninitialized record type: 'raw_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    320  609 |     in_addr raw_addr;
    321      |     ^               
    322      |                     {}
    323test/net_tests.cpp:614:9: error: uninitialized record type: 'lsi' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    324  614 |         LocalServiceInfo lsi;
    325      |         ^                   
    326      |                             {}
    327test/net_tests.cpp:621:5: error: uninitialized record type: 'ipv4AddrPeer' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    328  621 |     in_addr ipv4AddrPeer;
    329      |     ^                   
    330      |                         {}
    331test/net_tests.cpp:636:5: error: uninitialized record type: 'ipv6AddrLocal' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    332  636 |     in6_addr ipv6AddrLocal;
    333      |     ^                     
    334      |                           {}
    335test/net_tests.cpp:671:5: error: uninitialized record type: 'peer_us_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    336  671 |     in_addr peer_us_addr;
    337      |     ^                   
    338      |                         {}
    339test/net_tests.cpp:676:5: error: uninitialized record type: 'peer_out_in_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    340  676 |     in_addr peer_out_in_addr;
    341      |     ^                       
    342      |                             {}
    343test/net_tests.cpp:697:5: error: uninitialized record type: 'peer_in_in_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    344  697 |     in_addr peer_in_in_addr;
    345      |     ^                      
    346      |                            {}
    347test/net_tests.cpp:776:5: error: uninitialized record type: 'sa' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    348  776 |     struct sockaddr_in sa;
    349      |     ^                    
    350      |                          {}
    351test/net_tests.cpp:829:5: error: uninitialized record type: 'peer_us_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    352  829 |     in_addr peer_us_addr;
    353      |     ^                   
    354      |                         {}
    355test/net_tests.cpp:834:5: error: uninitialized record type: 'peer_in_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    356  834 |     in_addr peer_in_addr;
    357      |     ^                   
    358      |                         {}
    359qt/notificator.cpp:71:7: error: constructor does not initialize these fields: width, height, stride, hasAlpha, channels, bitsPerSample [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    360   71 | class FreedesktopImage
    361      |       ^
    362   72 | {
    363   73 | public:
    364   74 |     FreedesktopImage() = default;
    365   75 |     explicit FreedesktopImage(const QImage &img);
    366   76 | 
    367   77 |     // Image to variant that can be marshalled over DBus
    368   78 |     static QVariant toVariant(const QImage &img);
    369   79 | 
    370   80 | private:
    371   81 |     int width, height, stride;
    372      |                              
    373      |              {}      {}      {}
    374   82 |     bool hasAlpha;
    375      |                  
    376      |                  {}
    377   83 |     int channels;
    378      |                 
    379      |                 {}
    380   84 |     int bitsPerSample;
    381      |                      
    382      |                      {}
    383qt/notificator.cpp:74:5: error: constructor does not initialize these fields: width, height, stride, hasAlpha, channels, bitsPerSample [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    384   74 |     FreedesktopImage() = default;
    385      |     ^
    386test/crypto_tests.cpp:926:13: error: uninitialized record type: 'tag' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    387  926 |             std::array<std::byte, Poly1305::TAGLEN> tag;
    388      |             ^                                          
    389      |                                                        {}
    390881 warnings generated.
    3911237 warnings generated.
    392clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/test/peerman_tests.cpp
    393clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/bip324.cpp
    394bip324.cpp:25:1: error: constructor does not initialize these fields: m_our_pubkey, m_session_id, m_send_garbage_terminator, m_recv_garbage_terminator [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    395   25 | BIP324Cipher::BIP324Cipher(const CKey& key, Span<const std::byte> ent32) noexcept :
    396      | ^
    397bip324.cpp:31:1: error: constructor does not initialize these fields: m_session_id, m_send_garbage_terminator, m_recv_garbage_terminator [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    398   31 | BIP324Cipher::BIP324Cipher(const CKey& key, const EllSwiftPubKey& pubkey) noexcept :
    399      | ^
    400bip324.cpp:46:5: error: uninitialized record type: 'hkdf_32_okm' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    401   46 |     std::array<std::byte, 32> hkdf_32_okm;
    402      |     ^                                    
    403      |                                          {}
    404dbwrapper.cpp:198:8: error: constructor does not initialize these fields: penv, pdb [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    405  198 | struct LevelDBContext {
    406      |        ^
    407  199 |     //! custom environment this database is using (may be nullptr in case of default environment)
    408  200 |     leveldb::Env* penv;
    409      |                       
    410      |                       {}
    411support/lockedpool.cpp:266:5: error: uninitialized record type: 'rlim' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    412  266 |     struct rlimit rlim;
    413      |     ^                 
    414      |                       {}
    415bench/addrman.cpp:36:9: error: uninitialized record type: 'addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    416   36 |         in6_addr addr;
    417      |         ^            
    418      |                      {}
    419638 warnings generated.
    420clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/util/fs.cpp
    421util/fs.cpp:70:5: error: uninitialized record type: 'lock' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    422   70 |     struct flock lock;
    423      |     ^                
    424      |                      {}
    425httpserver.cpp:728:9: error: uninitialized record type: 'params_q' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    426  728 |         struct evkeyvalq params_q;
    427      |         ^                        
    428      |                                  {}
    429clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/httprpc.cpp
    430httprpc.cpp:38:9: error: uninitialized record type: 'tv' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    431   38 |         struct timeval tv;
    432      |         ^                
    433      |                          {}
    434index/coinstatsindex.cpp:29:8: error: constructor does not initialize these fields: transaction_output_count, bogo_size, total_amount, total_subsidy, total_unspendable_amount, total_prevout_spent_amount, total_new_outputs_ex_coinbase_amount, total_coinbase_amount, total_unspendables_genesis_block, total_unspendables_bip30, total_unspendables_scripts, total_unspendables_unclaimed_rewards [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    435   29 | struct DBVal {
    436      |        ^
    437   30 |     uint256 muhash;
    438   31 |     uint64_t transaction_output_count;
    439      |                                      
    440      |                                      {}
    441   32 |     uint64_t bogo_size;
    442      |                       
    443      |                       {}
    444   33 |     CAmount total_amount;
    445      |                         
    446      |                         {}
    447   34 |     CAmount total_subsidy;
    448      |                          
    449      |                          {}
    450   35 |     CAmount total_unspendable_amount;
    451      |                                     
    452      |                                     {}
    453   36 |     CAmount total_prevout_spent_amount;
    454      |                                       
    455      |                                       {}
    456   37 |     CAmount total_new_outputs_ex_coinbase_amount;
    457      |                                                 
    458      |                                                 {}
    459   38 |     CAmount total_coinbase_amount;
    460      |                                  
    461      |                                  {}
    462   39 |     CAmount total_unspendables_genesis_block;
    463      |                                             
    464      |                                             {}
    465   40 |     CAmount total_unspendables_bip30;
    466      |                                     
    467      |                                     {}
    468   41 |     CAmount total_unspendables_scripts;
    469      |                                       
    470      |                                       {}
    471   42 |     CAmount total_unspendables_unclaimed_rewards;
    472      |                                                 
    473      |                                                 {}
    474script/signingprovider.cpp:439:12: error: constructor does not initialize these fields: inner [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    475  439 |     struct TreeNode {
    476      |            ^
    477  440 |         /** Hash of this node, if known; 0 otherwise. */
    478  441 |         uint256 hash;
    479  442 |         /** The left and right subtrees (note that their order is irrelevant). */
    480  443 |         std::unique_ptr<TreeNode> sub[2];
    481  444 |         /** If this is known to be a leaf node, a pointer to the (script, leaf_ver) pair.
    482  445 |          *  nullptr otherwise. */
    483  446 |         const std::pair<std::vector<unsigned char>, int>* leaf = nullptr;
    484  447 |         /** Whether or not this node has been explored (is known to be a leaf, or known to have children). */
    485  448 |         bool explored = false;
    486  449 |         /** Whether or not this node is an inner node (unknown until explored = true). */
    487  450 |         bool inner;
    488      |                   
    489      |                   {}
    490clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/pubkey.cpp
    491pubkey.cpp:346:1: error: constructor does not initialize these fields: m_pubkey [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    492  346 | EllSwiftPubKey::EllSwiftPubKey(Span<const std::byte> ellswift) noexcept
    493      | ^
    494pubkey.cpp:358:5: error: uninitialized record type: 'vch_bytes' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    495  358 |     std::array<uint8_t, CPubKey::COMPRESSED_SIZE> vch_bytes;
    496      |     ^                                                      
    497      |                                                            {}
    498clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/random.cpp
    499random.cpp:688:1: error: constructor does not initialize these fields: bitbuf [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    500  688 | FastRandomContext::FastRandomContext(const uint256& seed) noexcept : requires_seed(false), rng(MakeByteSpan(seed)), bitbuf_size(0) {}
    501      | ^
    502random.cpp:738:1: error: constructor does not initialize these fields: bitbuf [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    503  738 | FastRandomContext::FastRandomContext(bool fDeterministic) noexcept : requires_seed(!fDeterministic), rng(ZERO_KEY), bitbuf_size(0)
    504      | ^
    505validation.cpp:602:9: error: constructor does not initialize these fields: m_vsize, m_base_fees, m_modified_fees [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    506  602 |         explicit Workspace(const CTransactionRef& ptx) : m_ptx(ptx), m_hash(ptx->GetHash()) {}
    507      |         ^
    508qt/transactiondesc.cpp:106:5: error: uninitialized record type: 'status' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    509  106 |     interfaces::WalletTxStatus status;
    510      |     ^                                
    511      |                                      {}
    5121081 warnings generated.
    513clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/mapport.cpp
    514mapport.cpp:127:5: error: uninitialized record type: 'external_ipv4_addr' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    515  127 |     struct in_addr external_ipv4_addr;
    516      |     ^                                
    517      |                                      {}
    518mapport.cpp:163:5: error: uninitialized record type: 'urls' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    519  163 |     struct UPNPUrls urls;
    520      |     ^                   
    521      |                         {}
    522mapport.cpp:164:5: error: uninitialized record type: 'data' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    523  164 |     struct IGDdatas data;
    524      |     ^                   
    525      |                         {}
    526randomenv.cpp:384:5: error: uninitialized record type: 'name' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    527  384 |     struct utsname name;
    528      |     ^                  
    529      |                        {}
    530422 warnings generated.
    531clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/script/miniscript.cpp
    532492 warnings generated.
    533clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/timedata.cpp
    534624 warnings generated.
    535clang-tidy-18 -p=/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu -quiet -load=/tidy-build/libbitcoin-tidy.so /ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/logging.cpp
    536logging.cpp:145:8: error: constructor does not initialize these fields: flag [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    537  145 | struct CLogCategoryDesc {
    538      |        ^
    539qt/guiutil.cpp:840:1: error: constructor does not initialize these fields: m_pixmap_width, m_pixmap_height [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    540  840 | ThemedLabel::ThemedLabel(const PlatformStyle* platform_style, QWidget* parent)
    541      | ^
    542rpc/blockchain.cpp:65:8: error: constructor does not initialize these fields: height [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
    543   65 | struct CUpdatedBlock
    544      |        ^
    545   66 | {
    546   67 |     uint256 hash;
    547   68 |     int height;
    

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-19 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me