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

pull fanquake wants to merge 20 commits into bitcoin:master from fanquake:missing_prototypes changing 159 files +369 −394
  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:

    • #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)
    • #36489 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36489.svg"></sub> (wallet: rpc: Add snake_case aliases for wallet funding options by maflcko)
    • #36167 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36167.svg"></sub> ([RFC] 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)
    • #35911 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35911.svg"></sub> (Warn on and add missing [[noreturn]] by fanquake)
    • #35820 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35820.svg"></sub> (refactor: keep duration calculations typed by l0rinc)
    • #35646 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35646.svg"></sub> (RFC: Separate out runtime errors from BlockValidationState using util::Expected by yuvicc)
    • #35511 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35511.svg"></sub> (RFC: consensus: Make CAmount a class by hodlinator)
    • #35370 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35370.svg"></sub> (rpc: add key-origin modes to PSBT processing RPCs by junbyjun1238)
    • #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)
    • #34360 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34360.svg"></sub> (bench: add WalletBalanceManySpent for high-history wallet scenario by w0xlt)
    • #32857 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/32857.svg"></sub> (wallet: allow skipping script paths by Sjors)
    • #31507 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/31507.svg"></sub> (build: Use clang-cl to build on Windows natively by hebasto)
    • #29700 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/29700.svg"></sub> (kernel, refactor: return error status on all fatal errors by ryanofsky)
    • #26022 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/26022.svg"></sub> (Add util::ResultPtr class by ryanofsky)
    • #25722 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/25722.svg"></sub> (refactor: Use util::Result class for wallet loading 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. rpc: make AddInputs static, remove mismatched declaration
    The header declared AddInputs(..., bool rbf), which was never defined,
    while the definition takes std::optional<bool> and has no declaration.
    2021d6f97f
  14. common: make FeeModeInfo static, remove mismatched declaration 1fabf596ce
  15. rpc: remove undefined RPCResult::ToStringObj and ToDescriptionString
    These were declared in fa6b061fc1 but never defined or used.
    35ec0bcdd7
  16. qt: remove undefined BanTableModel::{start,stop}AutoRefresh
    The definitions were removed in 43c1f5b8d7, but the declarations were
    left behind.
    cd28d2847d
  17. http: use MockableSteadyClock::time_point in ShouldDisconnect declaration
    Match the definition, and the m_idle_since member.
    5f13d8f4fd
  18. [nomerge] leveldb changes a1dd0ffce7
  19. [nomerge] crc32c changes d31d6ec60b
  20. 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.
    b7968a2988
  21. 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.
    97e71d86ef
  22. rest: include httprpc.h for StartREST, InterruptREST and StopREST 252aab8bf9
  23. build: add -Wmissing-prototypes bd6c41c4d1
  24. build: add -Wmissing-declarations
    This is GCC's equivalent of clang's -Wmissing-prototypes for C++.
    ef0ee930dd
  25. qt: declare ForceActivation in macdockiconhandler.h
    It was declared locally in guiutil.cpp, so the definition was never
    checked against the declaration.
    e9fac46b70
  26. node: remove unused MakeMinisketch32FP d5d81abdae
  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.
    448308df8e
  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.
    97a732735a
  29. refactor: make forward-declared translation unit local functions static 30e857fe98
  30. fuzz: make script_assets_test_minimizer ParseScriptFlags static 89d95bea70
  31. refactor: declare functions used by tests in their module headers 1668bacbae
  32. rpc: declare getblockchaininfo and getdeploymentinfo in rpc/blockchain.h db799ef2fe
  33. fanquake force-pushed on Nov 6, 2026
  34. DrahtBot removed the label Needs rebase on Nov 6, 2026
  35. hebasto referenced this in commit c6dcda33b0 on Nov 7, 2026
  36. DrahtBot added the label Needs rebase on Nov 7, 2026
  37. DrahtBot commented at 1:54 PM on November 7, 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-07 15:51 UTC

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