From 02070e98750932b9825cd88bf761b7bf8709302a Mon Sep 17 00:00:00 2001 From: stoffu Date: Fri, 15 Dec 2017 14:50:16 +0900 Subject: [PATCH] misc fixes to eliminate compiler warnings --- main.cpp | 1 + src/MempoolStatus.cpp | 2 +- src/page.h | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index aa17fbf..4d7640f 100644 --- a/main.cpp +++ b/main.cpp @@ -392,6 +392,7 @@ main(int ac, const char* av[]) return xmrblocks.show_checkrawtx(raw_tx_data, action); else if (action == "push") return xmrblocks.show_pushrawtx(raw_tx_data, action); + return string("Provided action is neither check nor push"); }); } diff --git a/src/MempoolStatus.cpp b/src/MempoolStatus.cpp index 92da790..551df53 100644 --- a/src/MempoolStatus.cpp +++ b/src/MempoolStatus.cpp @@ -58,7 +58,7 @@ MempoolStatus::start_mempool_status_thread() else { cout << "Current network info read, "; - loop_index == 0; + loop_index = 0; } } diff --git a/src/page.h b/src/page.h index 474797c..fee3651 100644 --- a/src/page.h +++ b/src/page.h @@ -3129,7 +3129,7 @@ namespace xmreg context["data_prefix"] = data_prefix; - if (!strncmp(decoded_raw_data.c_str(), KEY_IMAGE_EXPORT_FILE_MAGIC, magiclen) == 0) + if (strncmp(decoded_raw_data.c_str(), KEY_IMAGE_EXPORT_FILE_MAGIC, magiclen) != 0) { string error_msg = fmt::format("This does not seem to be key image export data."); @@ -3274,7 +3274,7 @@ namespace xmreg context["data_prefix"] = data_prefix; - if (!strncmp(decoded_raw_data.c_str(), OUTPUT_EXPORT_FILE_MAGIC, magiclen) == 0) + if (strncmp(decoded_raw_data.c_str(), OUTPUT_EXPORT_FILE_MAGIC, magiclen) != 0) { string error_msg = fmt::format("This does not seem to be output keys export data.");