X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftypesafe_cb%2Ftest%2Fcompile_ok-cast_if_any.c;fp=ccan%2Ftypesafe_cb%2Ftest%2Fcompile_ok-cast_if_any.c;h=e8f3c49406c02d31312d298c38d4860c843f4b1c;hp=2955f60c93efb7ca29ef174b7f46203bd61f61f7;hb=da72623aec30213a593bd23dca80c89416598f75;hpb=ad3f309e3c13d6b88864aab146895c9df9bc6e5b 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,