endian: add constant versions.
[ccan] / ccan / tlist / test / compile_fail-tlist_top.c
index 622a5781532f583fd18e3645312327ad50950541..21651400ef0d94bf7cf6d2f7c9a55fdd0399b2dc 100644 (file)
@@ -16,20 +16,16 @@ int main(int argc, char *argv[])
 {
        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);
 
-       c = tlist_top(&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_top(&children, list);
+       (void) c; /* Suppress unused-but-set-variable warning. */
        return 0;
 }