]> git.ozlabs.org Git - ccan/blobdiff - ccan/tlist/test/compile_fail-tlist_tail.c
base64: fix for unsigned chars (e.g. ARM).
[ccan] / ccan / tlist / test / compile_fail-tlist_tail.c
index ab43ae90d38ca7ac2312e26343d54358416659e8..48f394446e076421c307dddcf2c1a70e91683d79 100644 (file)
@@ -16,20 +16,16 @@ int main(int argc, char *argv[])
 {
        struct tlist_children children;
        struct child child = { "child" };
 {
        struct tlist_children children;
        struct child child = { "child" };
-       void *c;
+#ifdef FAIL
+       struct cousin *c;
+#else
+       struct child *c;
+#endif
 
        tlist_init(&children);
        tlist_add(&children, &child, list);
 
 
        tlist_init(&children);
        tlist_add(&children, &child, list);
 
-       c = tlist_tail(&children,
-#ifdef FAIL
-#if !HAVE_FLEXIBLE_ARRAY_MEMBER
-#error Need flexible array members to check type
-#endif
-                     struct cousin,
-#else
-                     struct child,
-#endif
-                     list);
+       c = tlist_tail(&children, list);
+       (void) c; /* Suppress unused-but-set-variable warning. */
        return 0;
 }
        return 0;
 }