diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2016-08-12 02:49:03 -0400 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2016-08-12 16:49:03 +1000 |
commit | f69bbc18148c6fced50b01e04d552f0053fce20c (patch) | |
tree | a6d4f7250d32505ea9e0c94ceca4a98ce7416cb4 /bench | |
parent | a044bf81ace95df8fd9a5fd85fcf2c15f898cbd8 (diff) | |
download | mongo-f69bbc18148c6fced50b01e04d552f0053fce20c.tar.gz |
WT-2820 add gcc warn_unused_result attribute (#2938)
* Add the gcc "cold" attribute to the verbose, message, and assorted error functions (informs the compiler that the function is unlikely to be executed).
* Add the WT_IGNORE_RET() macro that ignores return values in the handfull of places we want to ignore return values.
* Replace calls to fprintf() in the utility with calls to util_err(), replace local variable names in error messages with class names.
Diffstat (limited to 'bench')
-rw-r--r-- | bench/wtperf/config.c | 4 | ||||
-rw-r--r-- | bench/wtperf/wtperf.c | 4 | ||||
-rw-r--r-- | bench/wtperf/wtperf_truncate.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/bench/wtperf/config.c b/bench/wtperf/config.c index 0dc38287155..475b6ffd2a4 100644 --- a/bench/wtperf/config.c +++ b/bench/wtperf/config.c @@ -390,9 +390,9 @@ config_threads(CONFIG *cfg, const char *config, size_t len) return (0); err: if (group != NULL) - (void)group->close(group); + testutil_check(group->close(group)); if (scan != NULL) - (void)scan->close(scan); + testutil_check(scan->close(scan)); fprintf(stderr, "invalid thread configuration or scan error: %.*s\n", diff --git a/bench/wtperf/wtperf.c b/bench/wtperf/wtperf.c index 58271106d61..12730872c47 100644 --- a/bench/wtperf/wtperf.c +++ b/bench/wtperf/wtperf.c @@ -2558,7 +2558,7 @@ drop_all_tables(CONFIG *cfg) "Error opening a session on %s", cfg->home); return (ret); } - (void)__wt_epoch(NULL, &start); + testutil_check(__wt_epoch(NULL, &start)); for (i = 0; i < cfg->table_count; i++) { if ((ret = session->drop( session, cfg->uris[i], NULL)) != 0) { @@ -2567,7 +2567,7 @@ drop_all_tables(CONFIG *cfg) goto err; } } - (void)__wt_epoch(NULL, &stop); + testutil_check(__wt_epoch(NULL, &stop)); msecs = WT_TIMEDIFF_MS(stop, start); lprintf(cfg, 0, 1, "Executed %" PRIu32 " drop operations average time %" PRIu64 "ms", diff --git a/bench/wtperf/wtperf_truncate.c b/bench/wtperf/wtperf_truncate.c index 672b07301e3..e6ebc83c681 100644 --- a/bench/wtperf/wtperf_truncate.c +++ b/bench/wtperf/wtperf_truncate.c @@ -192,7 +192,7 @@ run_truncate(CONFIG *cfg, CONFIG_THREAD *thread, */ if (cfg->truncate_single_ops) { while ((ret = cursor->next(cursor)) == 0) { - cursor->get_key(cursor, &next_key); + testutil_check(cursor->get_key(cursor, &next_key)); if (strcmp(next_key, truncate_item->key) == 0) break; if ((ret = cursor->remove(cursor)) != 0) { |