]> git.ozlabs.org Git - ccan/blobdiff - ccan/typesafe_cb/test/compile_ok-typesafe_cb-volatile.c
typesafe: fix warnings with gcc's -Wcast-qual
[ccan] / ccan / typesafe_cb / test / compile_ok-typesafe_cb-volatile.c
index ecb0c58b2dc8bfccf4f0e6f2bbbe4efcbcbc32c6..3fcb1ff656b3b576b887a74c63577b2fbca84247 100644 (file)
@@ -39,8 +39,9 @@ static void my_callback_post(/* volatile */ char *p, int x)
 
 int main(int argc, char *argv[])
 {
 
 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;
 }
        return 0;
 }