]> git.ozlabs.org Git - ccan/blobdiff - ccan/build_assert/_info.c
Make diag() go to stdout: everything else does.
[ccan] / ccan / build_assert / _info.c
index 555aae21b2236bfae4402697ac8c3b05f2dd3125..d2fe3d9c80fc240daf4cef1e3b8b9113e4a152df 100644 (file)
  * you would catch such changes in your code like so:
  *
  * Example:
+ *     #include <stddef.h>
+ *     #include <ccan/build_assert/build_assert.h>
+ *
+ *     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[])
 {