compile_fail-traverse-arg1.c 423 B

1234567891011121314151617181920212223242526272829303132
  1. #include <ccan/hashtable/hashtable.h>
  2. #include <ccan/hashtable/hashtable.c>
  3. #include <stdlib.h>
  4. struct foo {
  5. int i;
  6. };
  7. struct bar {
  8. int i;
  9. };
  10. static bool fn_bar_bar(
  11. #ifdef FAIL
  12. struct bar *
  13. #else
  14. struct foo *
  15. #endif
  16. foo,
  17. struct bar *bar)
  18. {
  19. return true;
  20. }
  21. int main(void)
  22. {
  23. struct hashtable *ht = NULL;
  24. struct bar *bar = NULL;
  25. hashtable_traverse(ht, struct foo, fn_bar_bar, bar);
  26. return 0;
  27. }