mirror of
https://github.com/monero-project/monero.git
synced 2026-06-12 19:11:36 -07:00
fix: warning: variable set but not used
This commit is contained in:
@@ -5055,7 +5055,7 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete
|
||||
} while(0); \
|
||||
|
||||
// generate sorted tables for all amounts and absolute offsets
|
||||
size_t tx_index = 0, block_index = 0;
|
||||
size_t tx_index = 0;
|
||||
for (const auto &entry : blocks_entry)
|
||||
{
|
||||
if (m_cancel)
|
||||
@@ -5120,7 +5120,6 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete
|
||||
|
||||
}
|
||||
}
|
||||
++block_index;
|
||||
}
|
||||
|
||||
// sort and remove duplicate absolute_offsets in offset_map
|
||||
|
||||
@@ -6689,14 +6689,12 @@ bool simple_wallet::transfer_main(const std::vector<std::string> &args_, bool ca
|
||||
uint64_t total_fee = 0;
|
||||
uint64_t dust_not_in_fee = 0;
|
||||
uint64_t dust_in_fee = 0;
|
||||
uint64_t change = 0;
|
||||
for (size_t n = 0; n < ptx_vector.size(); ++n)
|
||||
{
|
||||
total_fee += ptx_vector[n].fee;
|
||||
for (auto i: ptx_vector[n].selected_transfers)
|
||||
total_sent += m_wallet->get_transfer_details(i).amount();
|
||||
total_sent -= ptx_vector[n].change_dts.amount + ptx_vector[n].fee;
|
||||
change += ptx_vector[n].change_dts.amount;
|
||||
|
||||
if (ptx_vector[n].dust_added_to_fee)
|
||||
dust_in_fee += ptx_vector[n].dust;
|
||||
|
||||
@@ -9730,7 +9730,7 @@ void wallet2::transfer_selected(const std::vector<cryptonote::tx_destination_ent
|
||||
//prepare inputs
|
||||
LOG_PRINT_L2("preparing outputs");
|
||||
typedef cryptonote::tx_source_entry::output_entry tx_output_entry;
|
||||
size_t i = 0, out_index = 0;
|
||||
size_t out_index = 0;
|
||||
std::vector<cryptonote::tx_source_entry> sources;
|
||||
for(size_t idx: selected_transfers)
|
||||
{
|
||||
@@ -9749,7 +9749,6 @@ void wallet2::transfer_selected(const std::vector<cryptonote::tx_destination_ent
|
||||
oe.second.mask = std::get<2>(outs[out_index][n]);
|
||||
|
||||
src.outputs.push_back(oe);
|
||||
++i;
|
||||
}
|
||||
|
||||
//paste real transaction to the random index
|
||||
@@ -9950,7 +9949,7 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
|
||||
|
||||
//prepare inputs
|
||||
LOG_PRINT_L2("preparing outputs");
|
||||
size_t i = 0, out_index = 0;
|
||||
size_t out_index = 0;
|
||||
std::vector<cryptonote::tx_source_entry> sources;
|
||||
for(size_t idx: selected_transfers)
|
||||
{
|
||||
@@ -9973,7 +9972,6 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
|
||||
oe.second.mask = std::get<2>(outs[out_index][n]);
|
||||
src.outputs.push_back(oe);
|
||||
}
|
||||
++i;
|
||||
|
||||
//paste real transaction to the random index
|
||||
auto it_to_replace = std::find_if(src.outputs.begin(), src.outputs.end(), [&](const tx_output_entry& a)
|
||||
@@ -12661,6 +12659,7 @@ bool wallet2::check_reserve_proof(const cryptonote::account_public_address &addr
|
||||
}
|
||||
catch(...) {}
|
||||
|
||||
THROW_WALLET_EXCEPTION_IF(!loaded, error::wallet_internal_error, "Failed to parse reserve proof signature data");
|
||||
THROW_WALLET_EXCEPTION_IF(subaddr_spendkeys.count(address.m_spend_public_key) == 0, error::wallet_internal_error,
|
||||
"The given address isn't found in the proof");
|
||||
|
||||
|
||||
@@ -657,9 +657,6 @@ TEST_F(test_levin_protocol_handler__hanle_recv_with_invalid_data, handles_bad_cb
|
||||
m_req_head.m_cb = sizeof(epee::levin::bucket_head2);
|
||||
m_req_head.m_flags = LEVIN_PACKET_BEGIN;
|
||||
m_req_head.m_command = 0;
|
||||
|
||||
epee::levin::bucket_head2 inner{};
|
||||
inner.m_cb = 2;
|
||||
m_in_data.resize(sizeof(epee::levin::bucket_head2));
|
||||
prepare_buf();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user