From a58cab8f9ff2dfd9e09153b2f248e36aee00b504 Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 1 May 2019 21:35:53 +0200 Subject: [PATCH] coretests: gcc warnings fixed --- tests/core_tests/escrow_wallet_common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/core_tests/escrow_wallet_common.h b/tests/core_tests/escrow_wallet_common.h index 067e7f49..12ef5e3e 100644 --- a/tests/core_tests/escrow_wallet_common.h +++ b/tests/core_tests/escrow_wallet_common.h @@ -59,7 +59,7 @@ void remove_all_entries_from_variant_container_by_type(container_t& container) inline bool refresh_wallet_and_check_1_contract_state(const char* wallet_name, std::shared_ptr wallet, uint32_t expected_contract_state, size_t block_to_be_fetched = SIZE_MAX) { - bool stub_bool = false, r; + bool stub_bool = false, r = false; size_t blocks_fetched = 0; LOG_PRINT_CYAN("Refreshing " << wallet_name << "'s wallet...", LOG_LEVEL_0); wallet->refresh(blocks_fetched); @@ -78,7 +78,7 @@ inline bool refresh_wallet_and_check_1_contract_state(const char* wallet_name, s inline bool refresh_wallet_and_check_contract_state(const char* wallet_name, std::shared_ptr wallet, uint32_t expected_contract_state, crypto::hash contract_id, size_t block_to_be_fetched = SIZE_MAX) { - bool stub_bool = false, r; + bool stub_bool = false, r = false; size_t blocks_fetched = 0; LOG_PRINT_CYAN("Refreshing " << wallet_name << "'s wallet...", LOG_LEVEL_0); wallet->refresh(blocks_fetched); @@ -87,6 +87,7 @@ inline bool refresh_wallet_and_check_contract_state(const char* wallet_name, std tools::wallet2::escrow_contracts_container contracts; r = wallet->get_contracts(contracts); + CHECK_AND_ASSERT_MES(r, false, "get_contracts() for " << wallet_name << " failed"); for (const auto& c : contracts) { if (c.first == contract_id)