From c85672eb136899e249ec6efe336e802ca450e027 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Mon, 13 Aug 2012 22:19:41 +0200 Subject: [PATCH] test: avoid compiler complaints about implicit double-to-int cast --- test/benchmark-fs-stat.c | 2 +- test/runner.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/benchmark-fs-stat.c b/test/benchmark-fs-stat.c index e6b8a637..ea5b5975 100644 --- a/test/benchmark-fs-stat.c +++ b/test/benchmark-fs-stat.c @@ -26,7 +26,7 @@ #include #define NUM_SYNC_REQS (10 * 1e5) -#define NUM_ASYNC_REQS (1 * 1e5) +#define NUM_ASYNC_REQS (1 * (int) 1e5) #define MAX_CONCURRENT_REQS 32 #define sync_stat(req, path) \ diff --git a/test/runner.c b/test/runner.c index 5f878a49..b34acc84 100644 --- a/test/runner.c +++ b/test/runner.c @@ -42,7 +42,7 @@ const char* fmt(double d) { char* p; p = (char *) calloc(1, 32) + 31; /* leaks memory */ - v = d; + v = (uint64_t) d; #if 0 /* works but we don't care about fractional precision */ if (d - v >= 0.01) {