X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftypesafe_cb%2Ftest%2Fcompile_fail-typesafe_cb_postargs.c;h=2100368f03292e41e94c5624d366f8de91b93e16;hp=885a3c551c171123d42301e760e95489a297d95f;hb=ad2ce76c10f808283ea7cf25cd8e76a15710c4f3;hpb=85a33135890965218010b79c89e4d3f4905727e3 diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c index 885a3c55..2100368f 100644 --- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c +++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb_postargs.c @@ -3,20 +3,24 @@ static void _register_callback(void (*cb)(void *arg, int x), void *arg) { + (void)cb; + (void)arg; } #define register_callback(cb, arg) \ - _register_callback(typesafe_cb_postargs(void, (cb), (arg), int), (arg)) + _register_callback(typesafe_cb_postargs(void, void *, (cb), (arg), int), (arg)) static void my_callback(char *p, int x) { + (void)p; + (void)x; } -int main(int argc, char *argv[]) +int main(void) { #ifdef FAIL int *p; #if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P -#error "Unfortunately we don't fail if cast_if_type is a noop." +#error "Unfortunately we don't fail if typesafe_cb_cast is a noop." #endif #else char *p;