diff --git a/Makefile b/Makefile index f35b5318..cff224b7 100644 --- a/Makefile +++ b/Makefile @@ -114,6 +114,7 @@ $(APP_OBJS): CFLAGS += \ -Ideps/sqlite \ -Ideps/valgrind \ -Ideps/xopt \ + -Wdouble-promotion \ -Werror BLOWFISH_SOURCES := \ diff --git a/src/ssb.tests.c b/src/ssb.tests.c index 9a32fc56..e355f1cb 100644 --- a/src/ssb.tests.c +++ b/src/ssb.tests.c @@ -542,7 +542,7 @@ void tf_ssb_test_bench(const tf_test_options_t* options) tf_ssb_append_post(ssb0, "Hello, world!"); } clock_gettime(CLOCK_REALTIME, &end_time); - tf_printf("insert = %f seconds\n", (float)(end_time.tv_sec - start_time.tv_sec) + (end_time.tv_nsec - start_time.tv_nsec) / 1e9f); + tf_printf("insert = %f seconds\n", (end_time.tv_sec - start_time.tv_sec) + (end_time.tv_nsec - start_time.tv_nsec) / 1e9); tf_ssb_t* ssb1 = tf_ssb_create(&loop, NULL, ":memory:"); tf_ssb_generate_keys(ssb1); @@ -571,7 +571,7 @@ void tf_ssb_test_bench(const tf_test_options_t* options) } clock_gettime(CLOCK_REALTIME, &end_time); tf_printf("Done.\n"); - tf_printf("replicate = %f seconds\n", (float)(end_time.tv_sec - start_time.tv_sec) + (end_time.tv_nsec - start_time.tv_nsec) / 1e9f); + tf_printf("replicate = %f seconds\n", (end_time.tv_sec - start_time.tv_sec) + (end_time.tv_nsec - start_time.tv_nsec) / 1e9); tf_ssb_send_close(ssb1); tf_ssb_server_close(ssb0);