X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftypesafe_cb%2Ftest%2Fcompile_ok-cast_if_any.c;h=e8f3c49406c02d31312d298c38d4860c843f4b1c;hb=d4929b8d2c8fc18ab16d2ef2bf7af11e87dac36d;hp=2955f60c93efb7ca29ef174b7f46203bd61f61f7;hpb=175ca4aa64c3489011b441a8c709693af1e70db0;p=ccan diff --git a/ccan/typesafe_cb/test/compile_ok-cast_if_any.c b/ccan/typesafe_cb/test/compile_ok-cast_if_any.c index 2955f60c..e8f3c494 100644 --- a/ccan/typesafe_cb/test/compile_ok-cast_if_any.c +++ b/ccan/typesafe_cb/test/compile_ok-cast_if_any.c @@ -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,