tdb2: fix msync() arg
[ccan] / ccan / cast / test / compile_fail-cast_signed-const.c
1 #include <ccan/cast/cast.h>
2 #include <stdlib.h>
3
4 int main(int argc, char *argv[])
5 {
6         unsigned char *uc;
7 #ifdef FAIL
8         const
9 #endif
10         char
11                 *p = NULL;
12
13         uc = cast_signed(unsigned char *, p);
14         return 0;
15 }
16
17 #ifdef FAIL
18 #if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P
19 #error "Unfortunately we don't fail if cast_const can only use size"
20 #endif
21 #endif