X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fexamples_compile.c;h=8ab806438f1b4aab25e033cda63fca6915017e0c;hp=1ccc620248cadd3b0723de8ee01fcbef8732e687;hb=1f45ec04761cd99011445c6d41cd64a3951f77e0;hpb=7bb7cd58c2d9df126dd6072e5f3bec1eb4dc916b diff --git a/tools/ccanlint/tests/examples_compile.c b/tools/ccanlint/tests/examples_compile.c index 1ccc6202..8ab80643 100644 --- a/tools/ccanlint/tests/examples_compile.c +++ b/tools/ccanlint/tests/examples_compile.c @@ -122,6 +122,9 @@ static bool compile(const void *ctx, if (!compile_and_link(ctx, file->fullname, ccan_dir, obj_list(m, file), "", lib_list(m), file->compiled, output)) { + /* Don't keep failures. */ + if (keep) + unlink(file->compiled); talloc_free(file->compiled); file->compiled = NULL; return false;