summaryrefslogtreecommitdiff
path: root/lib/ccan/tcon/test/compile_ok-void.c
blob: 26b712f6b2485c3632d97d143bc44930ea9fb854 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
}