summaryrefslogtreecommitdiff
path: root/lib/ccan/cast/test/compile_fail-cast_signed.c
blob: 66bcc0a1b5ef6f6bed57d9870d81ce00cebb5b50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <ccan/cast/cast.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
	unsigned char *uc;
#ifdef FAIL
	int
#else
	char
#endif
		*p = NULL;

	uc = cast_signed(unsigned char *, p);
	(void) uc; /* Suppress unused-but-set-variable warning. */
	return 0;
}