Remove/fix unused variables

This commit is contained in:
UdjinM6 2021-06-23 10:52:50 +03:00
parent b797fbd827
commit a18707e397
No known key found for this signature in database
GPG Key ID: 83592BD1400D58D9
12 changed files with 5 additions and 19 deletions

View File

@ -20,7 +20,6 @@
const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
static const int64_t DEFAULT_BENCH_EVALUATIONS = 5;
static const char* DEFAULT_BENCH_FILTER = ".*";
void InitBLSTests();

View File

@ -86,8 +86,6 @@ public:
ReceiveVvecs();
size_t memberIdx = 0;
bench.minEpochIterations(epoch_iters).run([&] {
auto& m = members[memberIdx];
ReceiveShares(memberIdx);
std::set<size_t> invalidIndexes;

View File

@ -11,7 +11,6 @@
#include <random.h>
static const int MIN_CORES = 2;
static const size_t BATCHES = 101;
static const size_t BATCH_SIZE = 30;
static const int PREVECTOR_SIZE = 28;

View File

@ -2046,7 +2046,6 @@ bool AppInitMain()
LogPrintf("* Using %.1fMiB for in-memory UTXO set (plus up to %.1fMiB of unused mempool space)\n", nCoinCacheUsage * (1.0 / 1024 / 1024), nMempoolSizeMax * (1.0 / 1024 / 1024));
bool fLoaded = false;
int64_t nStart = GetTimeMillis();
while (!fLoaded && !ShutdownRequested()) {
bool fReset = fReindex;

View File

@ -925,7 +925,7 @@ bool CBlockPolicyEstimator::Read(CAutoFile& filein)
try {
LOCK(cs_feeEstimator);
int nVersionRequired, nVersionThatWrote;
unsigned int nFileBestSeenHeight, nFileHistoricalFirst, nFileHistoricalBest;
unsigned int nFileBestSeenHeight;
filein >> nVersionRequired >> nVersionThatWrote;
if (nVersionRequired > CLIENT_VERSION)
return error("CBlockPolicyEstimator::Read(): up-version (%d) fee estimate file", nVersionRequired);

View File

@ -481,7 +481,6 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
unsigned int nBytes = 0;
unsigned int nBytesInputs = 0;
unsigned int nQuantity = 0;
int nQuantityUncompressed = 0;
bool fUnselectedSpent{false};
bool fUnselectedNonMixed{false};

View File

@ -42,9 +42,8 @@ void NetworkStyle::rotateColor(QColor& col, const int iconColorHueShift, const i
col.setHsl(h,s,l,a);
}
void NetworkStyle::rotateColors(QImage& img, const int iconColorHueShift, const int iconColorSaturationReduction) {
int h,s,l,a;
void NetworkStyle::rotateColors(QImage& img, const int iconColorHueShift, const int iconColorSaturationReduction)
{
// traverse though lines
for(int y=0;y<img.height();y++)
{

View File

@ -162,7 +162,7 @@ void WalletFrame::gotoSendCoinsPage(QString addr)
void WalletFrame::gotoCoinJoinCoinsPage(QString addr)
{
QMap<QString, WalletView*>::const_iterator i;
for (auto i = mapWalletViews.constBegin(); i != mapWalletViews.constEnd(); ++i) {
for (i = mapWalletViews.constBegin(); i != mapWalletViews.constEnd(); ++i) {
i.value()->gotoCoinJoinCoinsPage(addr);
}
}

View File

@ -63,7 +63,6 @@ struct mt_pooled_secure_allocator : public std::allocator<T> {
private:
size_t get_bucket()
{
auto tid = std::this_thread::get_id();
size_t x = std::hash<std::thread::id>{}(std::this_thread::get_id());
return x % pools.size();
}

View File

@ -517,7 +517,6 @@ BOOST_FIXTURE_TEST_CASE(dip3_test_mempool_reorg, TestChainDIP3Setup)
BOOST_FIXTURE_TEST_CASE(dip3_test_mempool_dual_proregtx, TestChainDIP3Setup)
{
int nHeight = chainActive.Height();
auto utxos = BuildSimpleUtxoMap(m_coinbase_txns);
// Create a MN

View File

@ -693,8 +693,6 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
auto itConflicting = pool.mapNextTx.find(txin.prevout);
if (itConflicting != pool.mapNextTx.end())
{
const CTransaction *ptxConflicting = itConflicting->second;
// Transaction conflicts with mempool and RBF doesn't exist in Dash
return state.Invalid(false, REJECT_DUPLICATE, "txn-mempool-conflict");
}
@ -824,7 +822,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
// Check against previous transactions
// This is done last to help prevent CPU exhaustion denial-of-service attacks.
PrecomputedTransactionData txdata(tx);
if (!CheckInputs(tx, state, view, true, STANDARD_SCRIPT_VERIFY_FLAGS, true, false, txdata))
if (!CheckInputs(tx, state, view, true, scriptVerifyFlags, true, false, txdata))
return false; // state filled in by CheckInputs
// Check again against the current block tip's script verification
@ -1235,7 +1233,6 @@ bool IsInitialBlockDownload()
return false;
if (fImporting || fReindex)
return true;
const CChainParams& chainParams = Params();
if (chainActive.Tip() == nullptr)
return true;
if (chainActive.Tip()->nChainWork < nMinimumChainWork)

View File

@ -5530,8 +5530,6 @@ void CMerkleTx::SetMerkleBranch(const CBlockIndex* pindex, int posInBlock)
int CMerkleTx::GetDepthInMainChain() const
{
int nResult;
if (hashUnset())
return 0;