aboutsummaryrefslogtreecommitdiffstats
path: root/tests/internals/test_rate_limiter.c
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2023-11-20 17:21:48 +0100
committerSebastian Pipping <sebastian@pipping.org>2023-11-20 18:36:08 +0100
commit9d5b333fb6e548aa2a9cda9094ad7e96e3eb33f7 (patch)
tree014d5a8d1de974ee2e07b9db67477df8d3a0adfb /tests/internals/test_rate_limiter.c
parent9cc4a6928da3931d0d7d6afad4489384cb21de23 (diff)
downloadbindfs-9d5b333fb6e548aa2a9cda9094ad7e96e3eb33f7.tar.gz
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]
Diffstat (limited to 'tests/internals/test_rate_limiter.c')
-rw-r--r--tests/internals/test_rate_limiter.c10
1 files changed, 5 insertions, 5 deletions
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();