diff options
author | Keith Bostic <keith@wiredtiger.com> | 2014-09-01 13:51:24 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2014-09-01 13:51:24 -0400 |
commit | 5bc3978d88c50b884ca57562b6be3a01b6904052 (patch) | |
tree | 628b227cca09b8f3cb22c89077185a470b7eaf5d /bench | |
parent | 0a101971f76a107ba510007115c08126a15faa2c (diff) | |
download | mongo-5bc3978d88c50b884ca57562b6be3a01b6904052.tar.gz |
clang unconditionalized variable complaint
sort the switch options, fix the switch formatting.
Diffstat (limited to 'bench')
-rw-r--r-- | bench/wtperf/wtperf.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/bench/wtperf/wtperf.c b/bench/wtperf/wtperf.c index 504ce6d0b65..e218e6e247b 100644 --- a/bench/wtperf/wtperf.c +++ b/bench/wtperf/wtperf.c @@ -163,41 +163,41 @@ cb_asyncop(WT_ASYNC_CALLBACK *cb, WT_ASYNC_OP *op, int ret, uint32_t flags) (void)cb; (void)flags; + + cfg = NULL; /* -Wconditional-uninitialized */ + type = op->get_type(op); if (type != WT_AOP_COMPACT) { thread = (CONFIG_THREAD *)op->app_private; cfg = thread->cfg; } + trk = NULL; switch (type) { - case WT_AOP_INSERT: - trk = &thread->insert; - break; - case WT_AOP_SEARCH: - trk = &thread->read; - if (ret == 0) { - if ((t_ret = op->get_value( - op, &value)) != 0) { - ret = t_ret; - lprintf(cfg, ret, 0, - "get_value in read."); - goto err; - } - } - break; - case WT_AOP_UPDATE: - trk = &thread->update; - break; - case WT_AOP_COMPACT: - tables = (uint32_t *)op->app_private; - ATOMIC_ADD(*tables, (uint32_t)-1); - break; - case WT_AOP_REMOVE: - case WT_AOP_NONE: - /* We never expect this type. */ - lprintf(cfg, ret, 0, "No type in op %" PRIu64, - op->get_id(op)); + case WT_AOP_COMPACT: + tables = (uint32_t *)op->app_private; + ATOMIC_ADD(*tables, (uint32_t)-1); + break; + case WT_AOP_INSERT: + trk = &thread->insert; + break; + case WT_AOP_SEARCH: + trk = &thread->read; + if (ret == 0 && + (t_ret = op->get_value(op, &value)) != 0) { + ret = t_ret; + lprintf(cfg, ret, 0, "get_value in read."); goto err; + } + break; + case WT_AOP_UPDATE: + trk = &thread->update; + break; + case WT_AOP_NONE: + case WT_AOP_REMOVE: + /* We never expect this type. */ + lprintf(cfg, ret, 0, "No type in op %" PRIu64, op->get_id(op)); + goto err; } /* |