]> git.ozlabs.org Git - ccan/blob - ccan/cast/test/compile_fail-cast_static-2.c
Remove unused main() args in many modules.
[ccan] / ccan / cast / test / compile_fail-cast_static-2.c
1 #include <ccan/cast/cast.h>
2 #include <stdlib.h>
3
4 int main(void)
5 {
6         char *c;
7 #ifdef FAIL
8         long
9 #else
10         char
11 #endif
12                 *p = 0;
13
14         c = cast_static(char *, p);
15         (void) c; /* Suppress unused-but-set-variable warning. */
16         return 0;
17 }
18
19 #ifdef FAIL
20 #if !HAVE_COMPOUND_LITERALS
21 #error "Unfortunately we don't fail if cast_static is a noop"
22 #endif
23 #endif