diff options
author | Maria Matejka <mq@ucw.cz> | 2019-02-08 11:19:04 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2019-02-20 22:30:54 +0100 |
commit | 0a793ebc6059f4354c62ccec62ef7c950988ca4a (patch) | |
tree | ff9f03cbfaae14a16751a73463aeb4f6f2c29d42 /test/birdtest.h | |
parent | 8bdb05edb2b4e1d2989ed98d67992047ad69443c (diff) |
Test: Fixed annoying warnings (and possible obscure bugs).
Diffstat (limited to 'test/birdtest.h')
-rw-r--r-- | test/birdtest.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/birdtest.h b/test/birdtest.h index 4443bfc1..18228711 100644 --- a/test/birdtest.h +++ b/test/birdtest.h @@ -54,11 +54,13 @@ void bt_log_suite_case_result(int result, const char *fmt, ...); #define BT_PROMPT_FAIL_NO_COLOR " [" "FAIL" "] " #define BT_PROMPT_OK_FAIL_STRLEN 8 /* strlen ' [FAIL] ' */ +static inline int bt_test_fn_noarg(const void *cp) { return ((int (*)(void)) cp)(); } + #define bt_test_suite(fn, dsc, ...) \ bt_test_suite_extra(fn, BT_FORKING, BT_TIMEOUT, dsc, ##__VA_ARGS__) #define bt_test_suite_extra(fn, f, t, dsc, ...) \ - bt_test_suite_base((int (*)(const void *))fn, #fn, NULL, f, t, dsc, ##__VA_ARGS__) + bt_test_suite_base(bt_test_fn_noarg, #fn, fn, f, t, dsc, ##__VA_ARGS__) #define bt_test_suite_arg(fn, arg, dsc, ...) \ bt_test_suite_arg_extra(fn, arg, BT_FORKING, BT_TIMEOUT, dsc, ##__VA_ARGS__) |