X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fbuild_assert%2F_info.c;h=d2fe3d9c80fc240daf4cef1e3b8b9113e4a152df;hp=555aae21b2236bfae4402697ac8c3b05f2dd3125;hb=04160dbda10c78fbd4ee452d0af89d540e20b09a;hpb=650c775ff00cccd03fc84e7789a03c51d9839004 diff --git a/ccan/build_assert/_info.c b/ccan/build_assert/_info.c index 555aae21..d2fe3d9c 100644 --- a/ccan/build_assert/_info.c +++ b/ccan/build_assert/_info.c @@ -18,12 +18,22 @@ * you would catch such changes in your code like so: * * Example: + * #include + * #include + * + * struct foo { + * char string[5]; + * int x; + * }; + * * char *foo_string(struct foo *foo) * { * // This trick requires that the string be first in the structure * BUILD_ASSERT(offsetof(struct foo, string) == 0); * return (char *)foo; * } + * + * Licence: LGPL (2 or any later version) */ int main(int argc, char *argv[]) {