ccanlint: print coverage amount when -vv
[ccan] / ccan / typesafe_cb / test / compile_ok-typesafe_cb-NULL.c
1 #include <ccan/typesafe_cb/typesafe_cb.h>
2 #include <stdlib.h>
3
4 /* NULL args for callback function should be OK for _exact and _def. */
5
6 static void _register_callback(void (*cb)(void *arg), void *arg)
7 {
8 }
9
10 #define register_callback_def(cb, arg)                          \
11         _register_callback(typesafe_cb_def(void, (cb), (arg)), (arg))
12
13 #define register_callback_exact(cb, arg)                                \
14         _register_callback(typesafe_cb_exact(void, (cb), (arg)), (arg))
15
16 int main(int argc, char *argv[])
17 {
18         register_callback_def(NULL, "hello world");
19         register_callback_exact(NULL, "hello world");
20         return 0;
21 }