refactor: Enable clang-tidy bugprone-unused-return-value

This requires some small refactors to silence false-positive warnings.

Also, expand the bugprone-unused-return-value.CheckedReturnTypes option
to include util::Result, and util::Expected.
This commit is contained in:
MarcoFalke
2025-12-06 10:31:54 +01:00
parent fa114be27b
commit faa23738fc
6 changed files with 10 additions and 6 deletions

View File

@@ -130,7 +130,7 @@ static void BnBExhaustion(benchmark::Bench& bench)
bench.run([&] {
// Benchmark
CAmount target = make_hard_case(17, utxo_pool);
SelectCoinsBnB(utxo_pool, target, 0, MAX_STANDARD_TX_WEIGHT); // Should exhaust
[[maybe_unused]] auto _{SelectCoinsBnB(utxo_pool, target, /*cost_of_change=*/0, MAX_STANDARD_TX_WEIGHT)}; // Should exhaust
// Cleanup
utxo_pool.clear();