aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-02-18 14:03:31 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-02-18 14:03:31 -0500
commitce5800a22539e3d5811edfdf4cdd07e1fbc62cef (patch)
treec4a46216b6b206fcee185d13ed6c6f344ae990b7 /tests/unit_tests
parentMerge pull request #7343 (diff)
parentRemove unused variables in monero codebase (diff)
downloadmonero-ce5800a22539e3d5811edfdf4cdd07e1fbc62cef.tar.xz
Merge pull request #7346
85db173 Remove unused variables in monero codebase (Kevin Barbour)
Diffstat (limited to 'tests/unit_tests')
-rw-r--r--tests/unit_tests/bulletproofs.cpp1
-rw-r--r--tests/unit_tests/hardfork.cpp1
-rw-r--r--tests/unit_tests/node_server.cpp1
-rw-r--r--tests/unit_tests/output_selection.cpp2
-rw-r--r--tests/unit_tests/zmq_rpc.cpp1
5 files changed, 1 insertions, 5 deletions
diff --git a/tests/unit_tests/bulletproofs.cpp b/tests/unit_tests/bulletproofs.cpp
index 7c6e459f5..ee617938c 100644
--- a/tests/unit_tests/bulletproofs.cpp
+++ b/tests/unit_tests/bulletproofs.cpp
@@ -296,7 +296,6 @@ TEST(bulletproof, weight_pruned)
ASSERT_TRUE(tx.version == 2);
ASSERT_FALSE(tx.pruned);
ASSERT_TRUE(rct::is_rct_bulletproof(tx.rct_signatures.type));
- const uint64_t tx_size = bd.size();
const uint64_t tx_weight = cryptonote::get_transaction_weight(tx);
ASSERT_TRUE(parse_and_validate_tx_base_from_blob(bd, pruned_tx));
ASSERT_TRUE(pruned_tx.version == 2);
diff --git a/tests/unit_tests/hardfork.cpp b/tests/unit_tests/hardfork.cpp
index 6d7e9a8aa..912651de4 100644
--- a/tests/unit_tests/hardfork.cpp
+++ b/tests/unit_tests/hardfork.cpp
@@ -432,7 +432,6 @@ TEST(voting, info)
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
static const uint8_t block_versions[] = { 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4 };
- static const uint8_t expected_versions[] = { 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4 };
static const uint8_t expected_thresholds[] = { 0, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 2, 2, 2, 2 };
for (uint64_t h = 0; h < sizeof(block_versions) / sizeof(block_versions[0]); ++h) {
diff --git a/tests/unit_tests/node_server.cpp b/tests/unit_tests/node_server.cpp
index 4d6f09e69..af297d01a 100644
--- a/tests/unit_tests/node_server.cpp
+++ b/tests/unit_tests/node_server.cpp
@@ -250,7 +250,6 @@ TEST(ban, subnet)
TEST(ban, ignores_port)
{
- time_t seconds;
test_core pr_core;
cryptonote::t_cryptonote_protocol_handler<test_core> cprotocol(pr_core, NULL);
Server server(cprotocol);
diff --git a/tests/unit_tests/output_selection.cpp b/tests/unit_tests/output_selection.cpp
index cff509451..20dc58e03 100644
--- a/tests/unit_tests/output_selection.cpp
+++ b/tests/unit_tests/output_selection.cpp
@@ -206,7 +206,7 @@ TEST(select_outputs, same_distribution)
for (size_t i = 0; i < chain_picks.size(); ++i)
chain_norm[i * 100 / chain_picks.size()] += chain_picks[i];
- double max_dev = 0.0, avg_dev = 0.0;
+ double avg_dev = 0.0;
for (size_t i = 0; i < 100; ++i)
{
const double diff = (double)output_norm[i] - (double)chain_norm[i];
diff --git a/tests/unit_tests/zmq_rpc.cpp b/tests/unit_tests/zmq_rpc.cpp
index 59759bed8..66a7f3ac1 100644
--- a/tests/unit_tests/zmq_rpc.cpp
+++ b/tests/unit_tests/zmq_rpc.cpp
@@ -202,7 +202,6 @@ namespace
MASSERT(!expected.empty());
std::size_t actual_height = 0;
- crypto::hash actual_id{};
crypto::hash actual_prev_id{};
std::vector<crypto::hash> actual_ids{};
GET_FROM_JSON_OBJECT(pub.second, actual_height, first_height);