X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftcon%2Ftest%2Fcompile_ok-void.c;fp=ccan%2Ftcon%2Ftest%2Fcompile_ok-void.c;h=26b712f6b2485c3632d97d143bc44930ea9fb854;hb=5c451bbbed80e3bcb1f6be4301026ece01ab1309;hp=0000000000000000000000000000000000000000;hpb=37965b33eeb202773dc70c4546d0b050b8e717b5;p=ccan diff --git a/ccan/tcon/test/compile_ok-void.c b/ccan/tcon/test/compile_ok-void.c new file mode 100644 index 00000000..26b712f6 --- /dev/null +++ b/ccan/tcon/test/compile_ok-void.c @@ -0,0 +1,21 @@ +#include +#include + +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; +}