summaryrefslogtreecommitdiff
path: root/lib/ccan/str/test/compile_fail-strchr.c
blob: 74a7314d06b7807eb22c1f3865ac9586c7b83d0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#define CCAN_STR_DEBUG 1
#include <ccan/str/str.h>

int main(int argc, char *argv[])
{
#ifdef FAIL
#if !HAVE_TYPEOF
	#error We need typeof to check strstr.
#endif
#else
	const
#endif
		char *ret;
	const char *str = "hello";

	ret = strchr(str, 'l');
	return ret ? 0 : 1;
}