From e344efefb739196f0e75b86ee0e23388c02459ba Mon Sep 17 00:00:00 2001 From: anonimal Date: Wed, 20 Feb 2019 04:11:33 +0000 Subject: [PATCH] currency_core: resolve build warnings (-Wlogical-not-parentheses) --- src/currency_core/blockchain_storage.cpp | 2 +- src/currency_core/currency_format_utils.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/currency_core/blockchain_storage.cpp b/src/currency_core/blockchain_storage.cpp index dfe9c6a4..13d7d90c 100644 --- a/src/currency_core/blockchain_storage.cpp +++ b/src/currency_core/blockchain_storage.cpp @@ -3544,7 +3544,7 @@ bool blockchain_storage::check_tx_inputs(const transaction& tx, const crypto::ha if (!m_is_in_checkpoint_zone) { CHECK_AND_ASSERT_MES(tx.signatures.size() == sig_index, false, "tx signatures count differs from inputs"); - if (!get_tx_flags(tx)&TX_FLAG_SIGNATURE_MODE_SEPARATE) + if (!(get_tx_flags(tx) & TX_FLAG_SIGNATURE_MODE_SEPARATE)) { bool r = validate_attachment_info(tx.extra, tx.attachment, false); CHECK_AND_ASSERT_MES(r, false, "Failed to validate attachments in tx " << tx_prefix_hash << ": incorrect extra_attachment_info in tx.extra"); diff --git a/src/currency_core/currency_format_utils.cpp b/src/currency_core/currency_format_utils.cpp index 673092ca..ad612fe8 100644 --- a/src/currency_core/currency_format_utils.cpp +++ b/src/currency_core/currency_format_utils.cpp @@ -1109,7 +1109,7 @@ namespace currency att_count++; } } - if (!flags&TX_FLAG_SIGNATURE_MODE_SEPARATE) + if (!(flags & TX_FLAG_SIGNATURE_MODE_SEPARATE)) { //take hash from attachment and put into extra if (tx.attachment.size()) @@ -2374,7 +2374,7 @@ namespace currency //--------------------------------------------------------------- bool is_pos_block(const block& b) { - if (!b.flags&CURRENCY_BLOCK_FLAG_POS_BLOCK) + if (!(b.flags & CURRENCY_BLOCK_FLAG_POS_BLOCK)) return false; return is_pos_block(b.miner_tx); }