summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2017-07-21 07:44:57 -0400
committerGitHub <noreply@github.com>2017-07-21 07:44:57 -0400
commit43bf51cee96e028b8e0ed6b6e1cfe16faf891347 (patch)
treed2414f7fd072da44a1e9e6d5e66d22df6b4679a6
parent20ccb36417e3456553274a6d9c5498660cf790cd (diff)
downloadmongo-43bf51cee96e028b8e0ed6b6e1cfe16faf891347.tar.gz
WT-3442 Coverity 1378213: false positive on diagnostic assignment. (#3529)
* WT-3442 Coverity 1378213: false positive on diagnostic assignment. CID 1378213 (#1 of 1): Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment upd = *updp has a side effect. This code will work differently in a non-debug build. * rec_write.c:1312:80: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
-rw-r--r--src/reconcile/rec_write.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/reconcile/rec_write.c b/src/reconcile/rec_write.c
index b0b9c66af6a..ae138301357 100644
--- a/src/reconcile/rec_write.c
+++ b/src/reconcile/rec_write.c
@@ -1309,8 +1309,9 @@ __rec_txn_read(WT_SESSION_IMPL *session, WT_RECONCILE *r,
}
/* Reconciliation should never see a reserved update. */
- WT_ASSERT(session, (upd = *updp) == NULL ||
- (upd->txnid != WT_TXN_ABORTED && upd->type != WT_UPDATE_RESERVED));
+ WT_ASSERT(session, *updp == NULL ||
+ ((*updp)->txnid != WT_TXN_ABORTED &&
+ (*updp)->type != WT_UPDATE_RESERVED));
r->update_mem_all += update_mem;