X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Falignof%2Ftest%2Frun.c;h=5e3216f1708e61000c76f135aaa759749f6452d3;hb=d3d2242ba8d975f8d7ddaa0348953dfd6f45ffce;hp=f76fb6691c73c9692cb1a767723b0f9a63e33a72;hpb=650c775ff00cccd03fc84e7789a03c51d9839004;p=ccan diff --git a/ccan/alignof/test/run.c b/ccan/alignof/test/run.c index f76fb669..5e3216f1 100644 --- a/ccan/alignof/test/run.c +++ b/ccan/alignof/test/run.c @@ -1,7 +1,7 @@ +#include #include #include -#include -#include "alignof/alignof.h" +#include /* Alignment is remarkably difficult to test. The rules may be more * complex than ALIGNOF() can know: eg. on i386 __alignof__(double) == 8, but @@ -24,7 +24,7 @@ struct lots_of_types char c5; }; -int main(int argc, char *argv[]) +int main(void) { struct lots_of_types lots_of_types, *lp = malloc(sizeof(*lp)); char c; @@ -37,8 +37,7 @@ int main(int argc, char *argv[]) double d; /* Make sure we use all the variables. */ - c = 0; - c2 = c3 = c4 = c; + c = c2 = c3 = c4 = 0; plan_tests(15); ok1((unsigned long)&c % ALIGNOF(char) == 0);