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_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/internals/test_common.h') diff --git a/tests/internals/test_common.h b/tests/internals/test_common.h index 1688add..055fc38 100644 --- a/tests/internals/test_common.h +++ b/tests/internals/test_common.h @@ -10,8 +10,8 @@ extern int failures; #define TEST_ASSERT(expr) do { if (!(expr)) { printf("Assertion failed: %s:%d: `%s'\n", __FILE__, __LINE__, #expr); ++failures; } } while (0); #define NEAR(a, b, eps) (fabs((a) - (b)) < (eps)) -int run_suite(void (*suite)()); +int run_suite(void (*suite)(void)); -#define TEST_MAIN(suite) int main() { return run_suite(suite); } +#define TEST_MAIN(suite) int main(void) { return run_suite(suite); } #endif -- cgit v1.2.3