From 9d5b333fb6e548aa2a9cda9094ad7e96e3eb33f7 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 20 Nov 2023 17:21:48 +0100 Subject: src|tests: Address warning -Wstrict-prototypes Symptom with Clang 15: > In file included from userinfo.c:20: > ./userinfo.h:38:27: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] > void invalidate_user_cache(); /* safe to call from signal handler */ > ^ > void > [many more] --- tests/internals/test_rate_limiter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/internals/test_rate_limiter.c') diff --git a/tests/internals/test_rate_limiter.c b/tests/internals/test_rate_limiter.c index 09b219e..25e26fb 100644 --- a/tests/internals/test_rate_limiter.c +++ b/tests/internals/test_rate_limiter.c @@ -6,12 +6,12 @@ static const double epsilon = 0.000000000001; static volatile double time_now = 123123.0; -double test_clock() +double test_clock(void) { return time_now; } -void computes_correct_sleep_times() +void computes_correct_sleep_times(void) { time_now = 123123.0; RateLimiter limiter; @@ -29,7 +29,7 @@ void computes_correct_sleep_times() rate_limiter_destroy(&limiter); } -void works_after_being_idle() +void works_after_being_idle(void) { time_now = 123123.0; RateLimiter limiter; @@ -45,7 +45,7 @@ void works_after_being_idle() rate_limiter_destroy(&limiter); } -void sleeps_correct_amount() +void sleeps_correct_amount(void) { RateLimiter limiter; rate_limiter_init(&limiter, 10, &gettimeofday_clock); @@ -58,7 +58,7 @@ void sleeps_correct_amount() rate_limiter_destroy(&limiter); } -void rate_limiter_suite() +void rate_limiter_suite(void) { computes_correct_sleep_times(); works_after_being_idle(); -- cgit v1.2.3