X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftypesafe_cb%2Ftest%2Fcompile_fail-typesafe_cb.c;h=bcc6ed63ea51c5a0f912514fb14c8c970eda488d;hb=97648992fdd50535fe276261368c179df993202b;hp=d305d5fb1101fc1c3a242346f97a5218fd166744;hpb=650c775ff00cccd03fc84e7789a03c51d9839004;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 d305d5fb..bcc6ed63 100644 --- a/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c +++ b/ccan/typesafe_cb/test/compile_fail-typesafe_cb.c @@ -1,4 +1,4 @@ -#include "typesafe_cb/typesafe_cb.h" +#include #include static void _register_callback(void (*cb)(void *arg), void *arg) @@ -14,6 +14,7 @@ static void my_callback(char *p) int main(int argc, char *argv[]) { + char str[] = "hello world"; #ifdef FAIL int *p; #if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P @@ -25,7 +26,7 @@ int main(int argc, char *argv[]) p = NULL; /* This should work always. */ - register_callback(my_callback, "hello world"); + register_callback(my_callback, str); /* This will fail with FAIL defined */ register_callback(my_callback, p);