X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftypesafe_cb%2Ftest%2Fcompile_fail-typesafe_cb.c;h=5d569373bb1ef13ec4f68b4bc4bb7b846a46ca2c;hb=e7e57cbf6725debd99238ccd8e3bf273a8d7e61c;hp=bcc6ed63ea51c5a0f912514fb14c8c970eda488d;hpb=148c09482cd343f1c02526908a2612d327412697;p=ccan diff --git a/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c b/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c index bcc6ed63..5d569373 100644 --- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c +++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c @@ -6,19 +6,19 @@ static void _register_callback(void (*cb)(void *arg), void *arg) } #define register_callback(cb, arg) \ - _register_callback(typesafe_cb(void, (cb), (arg)), (arg)) + _register_callback(typesafe_cb(void, void *, (cb), (arg)), (arg)) static void my_callback(char *p) { } -int main(int argc, char *argv[]) +int main(void) { char str[] = "hello world"; #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;