bitcoin/src/wallet
fanquake d5e5810bd3
Merge bitcoin/bitcoin#28999: build: Enable -Wunreachable-code
fa8adbe7c1 build: Enable -Wunreachable-code (MarcoFalke)

Pull request description:

  It seems a bit confusing to write code after a `return`. This can even lead to bugs, or incorrect code, such as https://github.com/bitcoin/bitcoin/pull/28830/files#r1415372320 . (Edit: The linked instance is not found by clang's `-Wunreachable-code`).

  Fix all issues by enabling `-Wunreachable-code`.

  This flag also enables `-Wunreachable-code-loop-increment`, according to https://clang.llvm.org/docs/DiagnosticsReference.html#wunreachable-code, so remove that.

ACKs for top commit:
  ajtowns:
    > ACK [fa8adbe](fa8adbe7c1)
  stickies-v:
    ACK fa8adbe7c1
  jonatack:
    ACK fa8adbe7c1 tested with arm64 clang 17.0.6

Tree-SHA512: 12a2f74b69ae002e62ae08038f7458837090a12051a4c154d05ae4bb26fb19fc1fa76c63aedf2b3fbb36f048c593ca3b8c0efe03fe93cf07a0fd114fc84ce1e7
2023-12-11 15:44:16 +00:00
..
rpc wallet: return CreatedTransactionResult from FundTransaction 2023-12-08 17:12:19 -05:00
test wallet: return CreatedTransactionResult from FundTransaction 2023-12-08 17:12:19 -05:00
bdb.cpp wallet: bdb: include bdb header from our implementation files only 2023-07-07 14:14:20 +00:00
bdb.h wallet: bdb: include bdb header from our implementation files only 2023-07-07 14:14:20 +00:00
coincontrol.cpp wallet: Explicitly preserve scriptSig and scriptWitness in CreateTransaction 2023-12-08 17:12:19 -05:00
coincontrol.h wallet: Explicitly preserve scriptSig and scriptWitness in CreateTransaction 2023-12-08 17:12:19 -05:00
coinselection.cpp Amend bumpfee for inputs with overlapping ancestry 2023-09-13 15:46:59 -04:00
coinselection.h Amend bumpfee for inputs with overlapping ancestry 2023-09-13 15:46:59 -04:00
context.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
context.h interfaces: Add schedulerMockForward method so mockscheduler RPC can work across processes 2023-10-20 10:30:16 -04:00
crypter.cpp refactor: Remove unused C-style casts 2023-07-24 15:32:00 +02:00
crypter.h scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
db.cpp refactor: Fix bugprone-string-constructor warning 2023-10-30 14:59:17 +01:00
db.h scripted-diff: Use DataStream in most places 2023-11-28 12:42:37 +01:00
dump.cpp Use only Span{} constructor for byte-like types where possible 2023-06-27 10:13:37 +02:00
dump.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
external_signer_scriptpubkeyman.cpp wallet: batch external signer descriptor import 2023-11-21 23:07:00 -03:00
external_signer_scriptpubkeyman.h wallet: batch external signer descriptor import 2023-11-21 23:07:00 -03:00
feebumper.cpp wallet: use optional for change position as an optional in CreateTransaction 2023-12-08 17:12:19 -05:00
feebumper.h rpc: bumpfee, improve doc for 'reduce_output' arg 2023-09-26 20:17:02 -03:00
fees.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
fees.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
init.cpp init: completely remove -zapwallettxes (remaining hidden option) 2023-11-03 20:00:44 +01:00
interfaces.cpp wallet: use optional for change position as an optional in CreateTransaction 2023-12-08 17:12:19 -05:00
load.cpp interfaces: Add schedulerMockForward method so mockscheduler RPC can work across processes 2023-10-20 10:30:16 -04:00
load.h interfaces: Add schedulerMockForward method so mockscheduler RPC can work across processes 2023-10-20 10:30:16 -04:00
receive.cpp Use Txid in COutpoint 2023-11-21 13:15:44 +00:00
receive.h wallet: Add wallet/types.h for simple public enum and struct types 2023-04-11 15:52:25 -04:00
salvage.cpp tidy: modernize-use-emplace 2023-10-12 11:27:19 +02:00
salvage.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
scriptpubkeyman.cpp wallet: descriptors setup, batch db operations 2023-11-21 23:01:42 -03:00
scriptpubkeyman.h wallet: batch external signer descriptor import 2023-11-21 23:07:00 -03:00
spend.cpp wallet: return CreatedTransactionResult from FundTransaction 2023-12-08 17:12:19 -05:00
spend.h wallet: return CreatedTransactionResult from FundTransaction 2023-12-08 17:12:19 -05:00
sqlite.cpp [refactor] Define MessageStartChars as std::array 2023-09-12 22:49:49 +02:00
sqlite.h wallet: sqlite: force sqlite3.h to be included by the cpp files 2023-07-06 19:53:44 +00:00
transaction.cpp wallet, refactor: Add CWalletTx::updateState function 2023-10-23 17:35:36 -04:00
transaction.h Use ParamsWrapper for witness serialization 2023-11-14 08:45:30 +10:00
types.h wallet: add AddressPurpose enum to replace string values 2023-04-11 15:52:25 -04:00
wallet.cpp Merge bitcoin/bitcoin#28894: wallet: batch all individual spkms setup db writes in a single db txn 2023-12-08 11:25:01 +00:00
wallet.h wallet: descriptors setup, batch db operations 2023-11-21 23:01:42 -03:00
walletdb.cpp build: Enable -Wunreachable-code 2023-12-05 15:36:08 +01:00
walletdb.h Clean up things that include script/standard.h 2023-08-14 17:38:27 -04:00
wallettool.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
wallettool.h Add src/wallet/* code to wallet:: namespace 2022-01-06 22:14:16 -05:00
walletutil.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
walletutil.h wallet: cache descriptor ID to avoid repeated descriptor string creation 2023-11-05 23:50:58 +01:00