6 suggestions
Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.
Optional improvements
[suggestion] · The -Wunused flag adds no diagnostics beyond the effective -Wunused-parameter change
The warning change is effectively enabling -Wunused-parameter, which drives nearly all of the source churn.
Location: CMakeLists.txt:483 (head).
Details and suggested fix
The warning interface already passes -Wall and -Wextra. GCC documents that -Wall implies -Wunused, and Clang includes -Wunused in -Wall, so the added line does not enable additional diagnostics. The effective change is removing the base block that appended -Wno-unused-parameter; with -Wall and -Wextra, that enables warnings for unused function parameters. Unused variables, private fields, static functions, and templates are already covered by -Wall and the existing -Wunused-const-variable, -Wunused-member-function, and -Wunused-template flags. Nearly all source changes rename or comment out parameters. Some cited cleanups, such as the IsNull() methods in #36012 and SetTargetBlockHash in #36137, are unused member functions with external linkage, which no enabled warning reports. Remove the redundant -Wunused line and describe the change as enabling -Wunused-parameter, so reviewers can assess the resulting churn against what that warning catches. The flag grouping is based on compiler documentation; it was not confirmed by compiling.
[suggestion] · RPC argument parsing changes the accepted maxtries and psbt_version ranges
Negative values are now rejected and values above INT_MAX are accepted; no in-tree caller or functional test uses these boundary values, so the practical impact is unconfirmed.
Location: src/rpc/mining.cpp:317 (head).
Details and suggested fix
Previously, generatetoaddress parsed an explicit maxtries with getInt<int>() before converting it to uint64_t: -1 wrapped to 2^64−1, effectively allowing unlimited tries, while values above INT_MAX failed with “JSON integer out of range.” Arg<uint64_t> now rejects negative values and accepts the full unsigned range. walletcreatefundedpsbt also changes psbt_version parsing from getInt<int>() to getInt<uint32_t>(). A negative value previously failed with RPC_INVALID_PARAMETER (“The PSBT version can only be 2 or 0”) and now fails with RPC_MISC_ERROR (“JSON integer out of range”). The new maxtries behavior matches generatetodescriptor, which already uses Arg<uint64_t>, and may be the better contract. However, the commit message says the refactor changes no behavior. No in-tree caller or functional test uses these boundary values, so the practical impact is unconfirmed. Either preserve the old parsing here, or put the range changes in a separate commit and describe them.
[suggestion] · The leveldb subtree edits have no linked upstream path
No leveldb-subtree PR is linked, while the build already provides a per-target mechanism to suppress this warning for leveldb alone.
Location: src/leveldb/db/db_impl.cc:1062 (head).
Details and suggested fix
The leveldb commit edits nine .cc files under src/leveldb, a subtree of bitcoin-core/leveldb-subtree whose ultimate upstream is google/leveldb. The developer notes ask for cosmetic subtree changes to go upstream. The description links upstream PRs for minisketch and libmultiprocess, but none for leveldb. cmake/leveldb.cmake already links nowarn_leveldb_interface after core_interface and uses try_append_cxx_flags(... IF_CHECK_PASSED "-Wno-covered-switch-default") to disable a warning for leveldb alone. Add a corresponding entry for -Wunused-parameter and drop the leveldb commit, keeping the warning enabled for Bitcoin Core code. Otherwise, open and link a leveldb-subtree PR. If a leveldb header included from Core sources also triggers the warning, that header would still need an upstream fix; this PR changes no leveldb headers.
[suggestion] · Dead parameters in internal functions are silenced instead of removed
Removing names from parameters that are unused in every build prevents -Wunused-parameter from identifying these leftovers.
Location: src/init.cpp:909 (head).
Details and suggested fix
For overrides and callbacks with fixed signatures, removing an unused parameter's name is appropriate. Some changed functions are internal and non-virtual, however, and their parameters are unused everywhere. AppInitBasicSetup does not read args or exit_status, though bitcoind.cpp and node/interfaces.cpp still pass them. SendCoinsDialog::processSendCoinsReturn ignores msgArg, while PrepareSendText formats a fee string only to pass it in. PSBTOperationsDialog::couldSignInputs ignores its psbtx argument and fills *m_transaction_data, which its only caller also passes. Once these names are removed, -Wunused-parameter cannot report the unused parameters. Consider deleting them here or in a listed follow-up. TestChain100Setup is an exception: MakeNoLogFileContext<T> constructs fixtures as T(chain_type, opts), and several benchmarks use it with TestChain100Setup, so chain_type must remain. Assert(chain_type == ChainType::REGTEST) is the alternative there. These signatures predate the PR, and behavior is unchanged.
[suggestion] · Unnamed same-typed callback arguments obscure their meaning
The base-class declarations were the only place these callback arguments were named, which mainly affects in-tree implementers and readers.
Location: src/kernel/bitcoinkernel_wrapper.h:1124 (head).
Details and suggested fix
The PR removes parameter names from default virtual methods. KernelNotifications::HeaderTipHandler and kernel::Notifications::headerTip no longer show which int64_t argument is the height and which is the timestamp. BlockTipHandler no longer identifies its double as verification progress, and CValidationInterface::UpdatedBlockTip no longer distinguishes the new-tip pointer from the fork-point pointer. An override that swaps same-typed arguments still compiles. Elsewhere, the PR keeps names in comments, for example in test_kernel.cpp and net_processing.cpp, so the style is inconsistent. Use /*name*/ comments or [[maybe_unused]] names in these declarations to silence -Wunused-parameter while retaining the argument meanings. Only bitcoinkernel.h is installed with the library, not bitcoinkernel_wrapper.h, so this mainly affects in-tree readers.
[suggestion] · The alias test does not check that Arg rejects the legacy name
The test never looks up legacy_def_bool, so it does not cover the commit message’s claim that the second alias is ignored.
Location: src/test/rpc_tests.cpp:650 (head).
Details and suggested fix
The fixture renames the argument to def_bool|legacy_def_bool but looks it up only as Arg<bool>("def_bool"). This shows that first-name lookup works past an aliased argument; the base GetName() would have triggered CHECK_NONFATAL. Nothing calls Arg<bool>("legacy_def_bool"), so the test would still pass if GetParamIndex later matched every alias. Add BOOST_CHECK_THROW(self.Arg<bool>("legacy_def_bool"), NonFatalCheckError); inside check_positional, or change the commit message to match what the test covers.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Retain the direct
<iterator>include