]> git.ozlabs.org Git - ccan/blobdiff - ccan/typesafe_cb/test/compile_ok-cast_if_any.c
ccan_tokenizer, check_type, container_of, typesafe_cb: handle !HAVE_TYPEOF
[ccan] / ccan / typesafe_cb / test / compile_ok-cast_if_any.c
index 2955f60c93efb7ca29ef174b7f46203bd61f61f7..e8f3c49406c02d31312d298c38d4860c843f4b1c 100644 (file)
@@ -23,9 +23,12 @@ static void take_any(struct any *any)
 
 int main(int argc, char *argv[])
 {
+#if HAVE_TYPEOF
+       /* Otherwise we get unused warnings for these. */
        struct foo *foo = NULL;
        struct bar *bar = NULL;
        struct baz *baz = NULL;
+#endif
        struct other *arg = NULL;
 
        take_any(cast_if_any(struct any *, arg, foo,