diff options
Diffstat (limited to 'lib/ccan/tcon/test/compile_ok-void.c')
-rw-r--r-- | lib/ccan/tcon/test/compile_ok-void.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/ccan/tcon/test/compile_ok-void.c b/lib/ccan/tcon/test/compile_ok-void.c new file mode 100644 index 0000000000..26b712f6b2 --- /dev/null +++ b/lib/ccan/tcon/test/compile_ok-void.c @@ -0,0 +1,21 @@ +#include <ccan/tcon/tcon.h> +#include <stdlib.h> + +struct container { + void *p; +}; + +struct void_container { + struct container raw; + TCON(void *canary); +}; + +int main(int argc, char *argv[]) +{ + struct void_container vcon; + + tcon_check(&vcon, canary, NULL)->raw.p = NULL; + tcon_check(&vcon, canary, argv[0])->raw.p = NULL; + tcon_check(&vcon, canary, main)->raw.p = NULL; + return 0; +} |