diff options
Diffstat (limited to 'ccan/str/test/compile_fail-STR_MAX_CHARS.c')
| -rw-r--r-- | ccan/str/test/compile_fail-STR_MAX_CHARS.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/ccan/str/test/compile_fail-STR_MAX_CHARS.c b/ccan/str/test/compile_fail-STR_MAX_CHARS.c deleted file mode 100644 index 8e0fd2e..0000000 --- a/ccan/str/test/compile_fail-STR_MAX_CHARS.c +++ /dev/null @@ -1,23 +0,0 @@ -#include <ccan/str/str.h> - -struct s { - int val; -}; - -int main(void) -{ - struct s -#ifdef FAIL -#if !HAVE_TYPEOF - #error We need typeof to check STR_MAX_CHARS. -#endif -#else - /* A pointer is OK. */ - * -#endif - val; - char str[STR_MAX_CHARS(val)]; - - str[0] = '\0'; - return str[0] ? 0 : 1; -} |
