mirror of
https://github.com/recp/cglm.git
synced 2025-10-03 16:51:35 +00:00
suppress warns about va-args
This commit is contained in:
@@ -106,7 +106,7 @@ typedef struct test_entry_t {
|
|||||||
#define TEST_IMPL_ARG3(arg1, arg2, arg3, ...) arg3
|
#define TEST_IMPL_ARG3(arg1, arg2, arg3, ...) arg3
|
||||||
|
|
||||||
#define TEST_IMPL_CHOOSER(...) \
|
#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__))
|
#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_ARG2(expr, msg) ASSERT_EXT(expr, msg)
|
||||||
#define ASSERT_ARG3(arg1, arg2, arg3, ...) arg3
|
#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 ASSERT(...) do { ASSERT_CHOOSER(__VA_ARGS__)(__VA_ARGS__) } while(0);
|
||||||
#define ASSERTIFY(expr) do { \
|
#define ASSERTIFY(expr) do { \
|
||||||
test_status_t ts; \
|
test_status_t ts; \
|
||||||
|
Reference in New Issue
Block a user