]> git.ozlabs.org Git - ccan/blobdiff - ccan/typesafe_cb/test/compile_ok-typesafe_cb_def-const.c
typesafe: fix warnings with gcc's -Wcast-qual
[ccan] / ccan / typesafe_cb / test / compile_ok-typesafe_cb_def-const.c
index 5017928a39e70aebd476e74e7dac0b45323bde6d..01e090f1dce310da97897e6fc7f41881aed10958 100644 (file)
@@ -38,8 +38,9 @@ static void my_callback_post(/*const*/ 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;
 }