]> git.ozlabs.org Git - ccan/blobdiff - container_of/test/compile_fail-bad-type.c
New variant of container_of: container_of_var, for list.h
[ccan] / container_of / test / compile_fail-bad-type.c
index d372fa54672bc7ae9f24fb5a0c0626c17a08a4b9..01dfd454597d0eb7d43244a3af81396e1648fc70 100644 (file)
@@ -13,6 +13,7 @@ int main(int argc, char *argv[])
        char *p;
 
 #ifdef FAIL
+       /* p is a char *, but this gives a struct foo * */
        p = container_of(intp, struct foo, a);
 #else
        p = (char *)intp;