X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest.c;h=0f2ab0c7f2cda15464d0ee7dc81b16d34e25b602;hp=334295ad158ed8a8852c5bfe7487b7db0666e303;hb=5caaeab8a7448390eb857006f9b3704de60cf115;hpb=caf366998b97b7cc29bc1f33c285feb2f5d33bff diff --git a/ccan/failtest/failtest.c b/ccan/failtest/failtest.c index 334295ad..0f2ab0c7 100644 --- a/ccan/failtest/failtest.c +++ b/ccan/failtest/failtest.c @@ -84,8 +84,9 @@ static struct failtest_call *add_history_(enum failtest_call_type type, #define add_history(type, file, line, elem) \ add_history_((type), (file), (line), (elem), sizeof(*(elem))) +/* We do a fake call inside a sizeof(), to check types. */ #define set_cleanup(call, clean, type) \ - (call)->cleanup = (void *)((void)sizeof(clean((type *)NULL)), (clean)) + (call)->cleanup = (void *)((void)sizeof(clean((type *)NULL),1), (clean)) static bool read_write_info(int fd) {