X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=container_of%2Ftest%2Fcompile_fail-bad-type.c;fp=container_of%2Ftest%2Fcompile_fail-bad-type.c;h=0000000000000000000000000000000000000000;hp=01dfd454597d0eb7d43244a3af81396e1648fc70;hb=650c775ff00cccd03fc84e7789a03c51d9839004;hpb=c8acddea39d222312102952e91c32cfe4dd2cea0 diff --git a/container_of/test/compile_fail-bad-type.c b/container_of/test/compile_fail-bad-type.c deleted file mode 100644 index 01dfd454..00000000 --- a/container_of/test/compile_fail-bad-type.c +++ /dev/null @@ -1,22 +0,0 @@ -#include "container_of/container_of.h" -#include - -struct foo { - int a; - char b; -}; - -int main(int argc, char *argv[]) -{ - struct foo foo = { .a = 1, .b = 2 }; - int *intp = &foo.a; - 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; -#endif - return p == NULL; -}