From b2080b9c022cd39df293934843824aac53e8d057 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 17 Jun 2020 16:30:19 +0800 Subject: [PATCH] Merge #19299: refactor: Remove unused vars, Add missing includes fa193c6b1b7da8f72a399bfddb1497655ce1685c Add missing includes to fix compile errors (MarcoFalke) fa09ec83f3f23dacb807c6b6393cabf2a984e4ff 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 fa193c6b1b7da8f72a399bfddb1497655ce1685c -- patch looks correct hebasto: ACK fa193c6b1b7da8f72a399bfddb1497655ce1685c, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 79b94e7f7ee3a1a8a8fb2ea1ecdf61f130f8b133a37865894da3dbbbf311979e7d1fc013b923fdd7dbf19a221e0232f664defbdb57aa44e0b8c45bfff3c71dcb --- src/fs.cpp | 5 ++++- src/interfaces/chain.h | 1 + src/qt/coincontroldialog.cpp | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fs.cpp b/src/fs.cpp index 867fd80d71..5e1d7af7ab 100644 --- a/src/fs.cpp +++ b/src/fs.cpp @@ -5,10 +5,12 @@ #include #ifndef WIN32 +#include #include #include #include #include +#include #else #ifndef NOMINMAX #define NOMINMAX @@ -32,7 +34,8 @@ FILE *fopen(const fs::path& p, const char *mode) #ifndef WIN32 -static std::string GetErrorReason() { +static std::string GetErrorReason() +{ return std::strerror(errno); } diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index 7309cb177d..cf27658354 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -8,6 +8,7 @@ #include // For CTransactionRef #include // For util::SettingsValue +#include #include #include #include diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index c6004d2d05..749e7870f6 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -461,7 +461,6 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel * // nPayAmount CAmount nPayAmount = 0; bool fDust = false; - CMutableTransaction txDummy; for (const CAmount &amount : CoinControlDialog::payAmounts) { nPayAmount += amount; @@ -470,7 +469,6 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel * { // Assumes a p2pkh script size CTxOut txout(amount, CScript() << std::vector(24, 0)); - txDummy.vout.push_back(txout); fDust |= IsDust(txout, model->node().getDustRelayFee()); } }