X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fhashtable%2Ftest%2Fcompile_fail-traverse-arg2.c;fp=ccan%2Fhashtable%2Ftest%2Fcompile_fail-traverse-arg2.c;h=5f6ea36a8bd5631a8fdb63ee6bce80441b5e79cc;hp=0000000000000000000000000000000000000000;hb=a447839504042d706b30c347a17150813ecadd4a;hpb=175ca4aa64c3489011b441a8c709693af1e70db0 diff --git a/ccan/hashtable/test/compile_fail-traverse-arg2.c b/ccan/hashtable/test/compile_fail-traverse-arg2.c new file mode 100644 index 00000000..5f6ea36a --- /dev/null +++ b/ccan/hashtable/test/compile_fail-traverse-arg2.c @@ -0,0 +1,31 @@ +#include +#include +#include + +struct foo { + int i; +}; + +struct bar { + int i; +}; + +static bool fn_foo_foo(struct foo *foo, +#ifdef FAIL + struct foo * +#else + struct bar * +#endif + bar) +{ + return true; +} + +int main(void) +{ + struct hashtable *ht = NULL; + struct bar *bar = NULL; + + hashtable_traverse(ht, struct foo, fn_foo_foo, bar); + return 0; +}