X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftypesafe_cb%2Ftest%2Fcompile_ok-typesafe_cb-volatile.c;h=3fcb1ff656b3b576b887a74c63577b2fbca84247;hp=93875c9e5d784dcb490227d7ae49f2f3e676d11c;hb=148c09482cd343f1c02526908a2612d327412697;hpb=11e4a54f54b4f1f39eeabc390ae51b93b7f08e36;ds=sidebyside diff --git a/ccan/typesafe_cb/test/compile_ok-typesafe_cb-volatile.c b/ccan/typesafe_cb/test/compile_ok-typesafe_cb-volatile.c index 93875c9e..3fcb1ff6 100644 --- a/ccan/typesafe_cb/test/compile_ok-typesafe_cb-volatile.c +++ b/ccan/typesafe_cb/test/compile_ok-typesafe_cb-volatile.c @@ -1,4 +1,4 @@ -#include "typesafe_cb/typesafe_cb.h" +#include #include /* volatile args in callbacks should be OK. */ @@ -28,18 +28,20 @@ static void my_callback(volatile char *p) { } -static void my_callback_pre(int x, volatile char *p) +/* FIXME: Can't handle volatile for these */ +static void my_callback_pre(int x, /* volatile */ char *p) { } -static void my_callback_post(volatile char *p, int x) +static void my_callback_post(/* volatile */ char *p, int x) { } int main(int argc, char *argv[]) { - register_callback(my_callback, "hello world"); - register_callback_pre(my_callback_pre, "hello world"); - register_callback_post(my_callback_post, "hello world"); + char p[] = "hello world"; + register_callback(my_callback, p); + register_callback_pre(my_callback_pre, p); + register_callback_post(my_callback_post, p); return 0; }