Skip to content

Commit 3faf342

Browse files
committed
Merge #19299: refactor: Remove unused vars, Add missing includes
fa193c6 Add missing includes to fix compile errors (MarcoFalke) fa09ec8 Remove unused variables (MarcoFalke) Pull request description: This is required for #19183, but seems like good cleanup that can go in upfront. ACKs for top commit: practicalswift: ACK fa193c6 -- patch looks correct hebasto: ACK fa193c6, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 79b94e7f7ee3a1a8a8fb2ea1ecdf61f130f8b133a37865894da3dbbbf311979e7d1fc013b923fdd7dbf19a221e0232f664defbdb57aa44e0b8c45bfff3c71dcb
2 parents 5cafb46 + fa193c6 commit 3faf342

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/fs.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
#include <fs.h>
66

77
#ifndef WIN32
8+
#include <cstring>
89
#include <fcntl.h>
910
#include <string>
1011
#include <sys/file.h>
1112
#include <sys/utsname.h>
13+
#include <unistd.h>
1214
#else
1315
#ifndef NOMINMAX
1416
#define NOMINMAX
@@ -31,7 +33,8 @@ FILE *fopen(const fs::path& p, const char *mode)
3133

3234
#ifndef WIN32
3335

34-
static std::string GetErrorReason() {
36+
static std::string GetErrorReason()
37+
{
3538
return std::strerror(errno);
3639
}
3740

src/interfaces/chain.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <optional.h> // For Optional and nullopt
99
#include <primitives/transaction.h> // For CTransactionRef
1010

11+
#include <functional>
1112
#include <memory>
1213
#include <stddef.h>
1314
#include <stdint.h>

src/qt/coincontroldialog.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,6 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
400400
// nPayAmount
401401
CAmount nPayAmount = 0;
402402
bool fDust = false;
403-
CMutableTransaction txDummy;
404403
for (const CAmount &amount : CoinControlDialog::payAmounts)
405404
{
406405
nPayAmount += amount;
@@ -409,7 +408,6 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
409408
{
410409
// Assumes a p2pkh script size
411410
CTxOut txout(amount, CScript() << std::vector<unsigned char>(24, 0));
412-
txDummy.vout.push_back(txout);
413411
fDust |= IsDust(txout, model->node().getDustRelayFee());
414412
}
415413
}

src/qt/transactionrecord.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const interface
4747
if(mine)
4848
{
4949
TransactionRecord sub(hash, nTime);
50-
CTxDestination address;
5150
sub.idx = i; // vout index
5251
sub.credit = txout.nValue;
5352
sub.involvesWatchAddress = mine & ISMINE_WATCH_ONLY;

src/wallet/wallet.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,6 @@ void CWallet::SetSpentKeyState(WalletBatch& batch, const uint256& hash, unsigned
746746
bool CWallet::IsSpentKey(const uint256& hash, unsigned int n) const
747747
{
748748
AssertLockHeld(cs_wallet);
749-
CTxDestination dst;
750749
const CWalletTx* srctx = GetWalletTx(hash);
751750
if (srctx) {
752751
assert(srctx->tx->vout.size() > n);

0 commit comments

Comments
 (0)