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] --- src/rate_limiter.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rate_limiter.h') diff --git a/src/rate_limiter.h b/src/rate_limiter.h index 95c0069..4a4ad85 100644 --- a/src/rate_limiter.h +++ b/src/rate_limiter.h @@ -30,16 +30,16 @@ extern const double rate_limiter_idle_credit; typedef struct RateLimiter { double rate; /* bytes / second */ - double (*clock)(); + double (*clock)(void); double last_modified; double accumulated_sleep_time; pthread_mutex_t mutex; } RateLimiter; -double gettimeofday_clock(); +double gettimeofday_clock(void); /* 0 on success, error number on error. */ -void rate_limiter_init(RateLimiter* limiter, double rate, double (*clock)()); +void rate_limiter_init(RateLimiter* limiter, double rate, double (*clock)(void)); /* Blocks until the rate limiter clears `size` units. */ void rate_limiter_wait(RateLimiter* limiter, size_t size); /* Updates the rate limiter like `rate_limiter_wait` but does not actually -- cgit v1.2.3