summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@mongodb.com>2016-06-08 00:58:49 -0400
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-06-08 14:58:49 +1000
commit36229a2693aa6e7bcb8fa471edf1ab05ee79869a (patch)
tree4a9e197e64f2d1c1a07b2595c828814cb82019a2 /bench
parent1e30ff33750b5a5885420654f6d39101b6cb8610 (diff)
downloadmongo-36229a2693aa6e7bcb8fa471edf1ab05ee79869a.tar.gz
WT-2682 add option to configure WiredTiger with strict compiler flags (#2773)
Add the --enable-strict option that uses our current best guess at the right flags for strict compilation. While adding the option, expand the set of flags we can compile cleanly with.
Diffstat (limited to 'bench')
-rw-r--r--bench/wtperf/wtperf.c2
-rw-r--r--bench/wtperf/wtperf.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/bench/wtperf/wtperf.c b/bench/wtperf/wtperf.c
index 1a3d98d3e3e..9d35f6fa640 100644
--- a/bench/wtperf/wtperf.c
+++ b/bench/wtperf/wtperf.c
@@ -2608,7 +2608,7 @@ wtperf_rand(CONFIG_THREAD *thread)
S2 = wtperf_value_range(cfg) *
(cfg->pareto / 100.0) * (PARETO_SHAPE - 1);
U = 1 - (double)rval / (double)UINT32_MAX;
- rval = (pow(U, S1) - 1) * S2;
+ rval = (uint64_t)((pow(U, S1) - 1) * S2);
/*
* This Pareto calculation chooses out of range values about
* 2% of the time, from my testing. That will lead to the
diff --git a/bench/wtperf/wtperf.h b/bench/wtperf/wtperf.h
index 83fab4d6028..d874fa4eefe 100644
--- a/bench/wtperf/wtperf.h
+++ b/bench/wtperf/wtperf.h
@@ -320,6 +320,9 @@ extract_key(char *key_buf, uint64_t *keynop)
* Print message and exit on failure.
*/
static inline void
+die(int, const char *)
+ WT_GCC_FUNC_DECL_ATTRIBUTE((noreturn));
+static inline void
die(int e, const char *str)
{
fprintf(stderr, "Call to %s failed: %s", str, wiredtiger_strerror(e));