[RFC] build: build with -Wmissing-declarations/prototypes #36743

pull fanquake wants to merge 21 commits into bitcoin:master from fanquake:missing_prototypes changing 177 files +855 −894
  1. fanquake commented at 1:11 PM on November 3, 2026: member

    Draft for now, as it requires upstream changes, and some codebase/style decisions. Some of the fixes will be split off in advance.

    Based on:

  2. DrahtBot commented at 1:11 PM on November 3, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #36897 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36897.svg"></sub> (wallet, migration: Contain all legacy wallet and migration related things in its own subdirectory, namespace, and classes by achow101)
    • #36885 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36885.svg"></sub> (wallet, rpc: Add analyzedescriptor for multisig setups by pablomartin4btc)
    • #36876 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36876.svg"></sub> (GUARDED_BY annotations for nTx, m_chain_tx_count by Crypt-iQ)
    • #36858 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36858.svg"></sub> (refactor: break the blockstorage/validation circular dependency by pzafonte)
    • #36856 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36856.svg"></sub> (kernel: add manual pruning by pzafonte)
    • #36855 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36855.svg"></sub> (rpc: Deprecate watchonly wallet no-op named options by maflcko)
    • #36854 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36854.svg"></sub> (kernel: let callers create the block manager by pzafonte)
    • #36826 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36826.svg"></sub> (rpc: Return the right RPCErrorCode more consistently by maflcko)
    • #36823 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36823.svg"></sub> (wallet, migration: Skip legacy wallet records rather than erasing them, and drop unused record erase functions by achow101)
    • #36822 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36822.svg"></sub> (fuzz: torcontrol: drive the control connection over a mocked socket by erickcestari)
    • #36820 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36820.svg"></sub> (refactor: remove more dead code by fanquake)
    • #36813 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36813.svg"></sub> (refactor: more prereqs for #36743 by fanquake)
    • #36808 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36808.svg"></sub> (iwyu: Fix warnings in src/test/fuzz and treat them as errors by hebasto)
    • #36753 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36753.svg"></sub> (rpc: Report -rpcwhitelist denials as JSON-RPC errors by ryanofsky)
    • #36721 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36721.svg"></sub> (script: store interpreter stack elements as reference-counted objects by conduition)
    • #36689 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36689.svg"></sub> (cli: Parse -signetchallenge like bitcoind by ekzyis)
    • #36631 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36631.svg"></sub> (fuzz: add a custom mutator for PSBT by brunoerg)
    • #36598 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36598.svg"></sub> ([Demo] validation: remove AssumeUTXO by l0rinc)
    • #36481 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36481.svg"></sub> (wallet, rpc, gui: Allow users to manually rebroadcast a wallet transaction by achow101)
    • #36266 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36266.svg"></sub> (rpc: Let dumptxoutset fail early on stale targets and concurrent runs by fjahr)
    • #36188 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36188.svg"></sub> (crypto: plug hardware optimized SHA256 into libsecp256k1's context by furszy)
    • #36167 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36167.svg"></sub> (build: Enable -Wunused by fanquake)
    • #36122 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36122.svg"></sub> (BIP460: CISA for Taproot key path spends by fjahr)
    • #36005 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36005.svg"></sub> (rpc, descriptor: warn when multipath expansion clones single-path key expressions by pythcoiner)
    • #35911 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35911.svg"></sub> (Warn on and add missing [[noreturn]] by fanquake)
    • #35713 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35713.svg"></sub> (Remove boost as a unit test runner by rustaceanrob)
    • #35474 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35474.svg"></sub> (node: move index ownership to NodeContext by w0xlt)
    • #35322 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35322.svg"></sub> (logging: streamline Logger state and drop redundant methods by ryanofsky)
    • #35302 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35302.svg"></sub> (Silent Payments: Sending (take 2) by Eunovo)
    • #35281 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35281.svg"></sub> (univalue: respect token end pointer by ferminquant)
    • #34909 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34909.svg"></sub> (wallet, refactor: modularise wallet by extracting out legacy wallet migration by rkrux)
    • #34872 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34872.svg"></sub> (wallet: fix mixed-input transaction accounting in history RPCs by w0xlt)
    • #34360 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34360.svg"></sub> (bench: add WalletBalanceManySpent for high-history wallet scenario by w0xlt)
    • #34193 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34193.svg"></sub> (wallet: make migration more robust against failures by furszy)
    • #34132 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34132.svg"></sub> (coins,dbwrapper: make point-read and txindex lookup failures fatal by l0rinc)
    • #33637 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/33637.svg"></sub> (validation: reduce block index comparison overhead by l0rinc)
    • #33324 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/33324.svg"></sub> (blocks: add resumable reobfuscation for existing block files by l0rinc)
    • #32857 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/32857.svg"></sub> (wallet: allow skipping script paths by Sjors)
    • #31260 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/31260.svg"></sub> (scripted-diff: Type-safe settings retrieval by ryanofsky)
    • #26022 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/26022.svg"></sub> (Add util::ResultPtr class by ryanofsky)
    • #25665 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/25665.svg"></sub> (refactor: Add util::Result failure types and ability to merge result values by ryanofsky)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  3. DrahtBot added the label CI failed on Nov 3, 2026
  4. fanquake force-pushed on Nov 3, 2026
  5. fanquake force-pushed on Nov 3, 2026
  6. ryanofsky referenced this in commit 388e37c5bc on Nov 3, 2026
  7. DrahtBot added the label Needs rebase on Nov 4, 2026
  8. fanquake force-pushed on Nov 4, 2026
  9. DrahtBot removed the label Needs rebase on Nov 4, 2026
  10. fanquake referenced this in commit 93bd4e1df4 on Nov 5, 2026
  11. DrahtBot added the label Needs rebase on Nov 5, 2026
  12. hebasto referenced this in commit b6ccaaef05 on Nov 6, 2026
  13. fanquake force-pushed on Nov 6, 2026
  14. DrahtBot removed the label Needs rebase on Nov 6, 2026
  15. hebasto referenced this in commit c6dcda33b0 on Nov 7, 2026
  16. DrahtBot added the label Needs rebase on Nov 7, 2026
  17. fanquake force-pushed on Nov 9, 2026
  18. DrahtBot removed the label Needs rebase on Nov 9, 2026
  19. [nomerge] leveldb changes 81ebde2335
  20. [nomerge] crc32c changes 6814ce778f
  21. DrahtBot added the label Needs rebase on Nov 10, 2026
  22. [nomerge] minisketch changes 6ce5f4389c
  23. refactor: make translation-unit local functions static
    These functions are only used within the file that defines them, and
    have no declaration elsewhere, so -Wmissing-prototypes (clang) and
    -Wmissing-declarations (GCC) warn about them. Give them internal
    linkage.
    
    fail_test_if_executed() is [[maybe_unused]], because TRACEPOINT discards
    its arguments when tracing is disabled.
    240bb703a6
  24. fuzz: declare libFuzzer entry points before defining them
    LLVMFuzzerTestOneInput and LLVMFuzzerInitialize are called by libFuzzer,
    so they can't be static. Declare them first, to avoid
    -Wmissing-prototypes / -Wmissing-declarations warnings.
    0019c33aac
  25. rest: include httprpc.h for StartREST, InterruptREST and StopREST 010dd27003
  26. qt: declare ForceActivation in macdockiconhandler.h
    It was declared locally in guiutil.cpp, so the definition was never
    checked against the declaration.
    b9cff75536
  27. refactor: make functions only used in their own translation unit static
    These functions are declared in a header, but only used in the file that
    defines them. Remove the declarations and give them internal linkage.
    0bc1d6c2e5
  28. refactor: make overloads only used in their own translation unit static
    These overloads (and the walletdb Load* helpers) are declared in a header,
    but only used in the file that defines them. Remove the declarations and
    give them internal linkage.
    51eac5e65a
  29. refactor: make forward-declared translation unit local functions static
    Also drop the forward declarations, reordering definitions where needed.
    d7d613824b
  30. refactor: declare functions used by tests in their module headers a6bb744c57
  31. rpc: declare getblockchaininfo and getdeploymentinfo in rpc/blockchain.h 71b510a640
  32. build: add -Wmissing-prototypes 0b9dee692c
  33. build: add -Wmissing-declarations
    This is GCC's equivalent of clang's -Wmissing-prototypes for C++.
    7b8e76fe7e
  34. wallet: declare RPC methods in wallet/rpc/wallet.h 534d298777
  35. wallet: move GetOptionWithAlias to wallet/rpc/util 60183b4b96
  36. test: make wallet_tests local functions static 00e0d4912d
  37. test: declare ParseScriptFlags in test/util/script.h ce2face86c
  38. random: declare MakeRandDeterministicDANGEROUS in random.h 09383081ca
  39. key: declare DER helpers used by fuzz tests in key.h and pubkey.h 44acc88748
  40. crypto: declare SHA-256 hardware implementations in sha256_impl.h b481ac457b
  41. fanquake force-pushed on Nov 10, 2026
  42. DrahtBot removed the label Needs rebase on Nov 10, 2026
  43. DrahtBot added the label Needs rebase on Nov 23, 2026
  44. DrahtBot commented at 10:29 AM on November 23, 2026: contributor

    <!--cf906140f33d8803c4a75a2196329ecb-->

    🐙 This pull request conflicts with the target branch and needs rebase.


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: 2026-11-24 00:51 UTC

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