From 33e78ca2ad733a36da6528154eb4c46bacccd1c0 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Tue, 27 Aug 2024 12:13:28 +0300 Subject: [PATCH] suppress warns about va-args --- test/include/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/include/common.h b/test/include/common.h index cdeede2..1b03f34 100644 --- a/test/include/common.h +++ b/test/include/common.h @@ -106,7 +106,7 @@ typedef struct test_entry_t { #define TEST_IMPL_ARG3(arg1, arg2, arg3, ...) arg3 #define TEST_IMPL_CHOOSER(...) \ - EXPAND(TEST_IMPL_ARG3(__VA_ARGS__, TEST_IMPL_ARG2, TEST_IMPL_ARG1)) + EXPAND(TEST_IMPL_ARG3(__VA_ARGS__, TEST_IMPL_ARG2, TEST_IMPL_ARG1,)) #define TEST_IMPL(...) EXPAND(TEST_IMPL_CHOOSER(__VA_ARGS__)(__VA_ARGS__)) @@ -127,7 +127,7 @@ typedef struct test_entry_t { #define ASSERT_ARG2(expr, msg) ASSERT_EXT(expr, msg) #define ASSERT_ARG3(arg1, arg2, arg3, ...) arg3 -#define ASSERT_CHOOSER(...) ASSERT_ARG3(__VA_ARGS__, ASSERT_ARG2, ASSERT_ARG1) +#define ASSERT_CHOOSER(...) ASSERT_ARG3(__VA_ARGS__, ASSERT_ARG2, ASSERT_ARG1,) #define ASSERT(...) do { ASSERT_CHOOSER(__VA_ARGS__)(__VA_ARGS__) } while(0); #define ASSERTIFY(expr) do { \ test_status_t ts; \