From 5139ab9b1ad4d58609f078f24bd2d013b9905cdb Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 13 Aug 2020 17:25:42 +0200 Subject: Fix Wno-implicit-int-float-conversion warning in benchmark --- test/bench.h | 4 ++-- wscript | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/bench.h b/test/bench.h index 3575633..716601b 100644 --- a/test/bench.h +++ b/test/bench.h @@ -22,8 +22,8 @@ static inline double elapsed_s(const struct timespec* start, const struct timespec* end) { - return ( (end->tv_sec - start->tv_sec) - + ((end->tv_nsec - start->tv_nsec) * 0.000000001) ); + return ( (double)(end->tv_sec - start->tv_sec) + + ((double)(end->tv_nsec - start->tv_nsec) * 0.000000001) ); } static inline struct timespec diff --git a/wscript b/wscript index aa93ef1..e127519 100644 --- a/wscript +++ b/wscript @@ -45,7 +45,6 @@ def configure(conf): '-Wno-cast-align', '-Wno-format-nonliteral', '-Wno-implicit-int-conversion', - '-Wno-implicit-int-float-conversion', '-Wno-padded', '-Wno-reserved-id-macro', '-Wno-shorten-64-to-32', -- cgit v1.2.1