X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fmain_header_compiles.c;h=f54c6173a53578e76c6e805cf281ef7319a6c19a;hp=c20d73cae0fcde2327268a33176a9e98163cc7e5;hb=9a8344b2cd849a5506ca5e93bfc30665fb35acab;hpb=aabf300e324f7da5134d7ad45afba11225045c24 diff --git a/tools/ccanlint/tests/main_header_compiles.c b/tools/ccanlint/tests/main_header_compiles.c index c20d73ca..f54c6173 100644 --- a/tools/ccanlint/tests/main_header_compiles.c +++ b/tools/ccanlint/tests/main_header_compiles.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include @@ -49,8 +48,8 @@ static void check_includes_build(struct manifest *m, if (fd < 0) err(1, "Creating temporary file %s", tmpsrc); - contents = talloc_asprintf(tmpsrc, "#include \n", - m->modname, m->basename); + contents = tal_fmt(tmpsrc, "#include \n", + m->modname, m->basename); if (write(fd, contents, strlen(contents)) != strlen(contents)) err(1, "writing to temporary file %s", tmpsrc); close(fd); @@ -60,7 +59,7 @@ static void check_includes_build(struct manifest *m, score->pass = true; score->score = score->total; } else { - score->error = talloc_asprintf(score, + score->error = tal_fmt(score, "#include of the main header file:\n%s", cmdout); } @@ -71,7 +70,7 @@ struct ccanlint main_header_compiles = { .name = "Modules main header compiles", .check = check_includes_build, .can_run = can_build, - .needs = "depends_exist main_header_exists" + .needs = "depends_exist main_header_exists info_ported" }; REGISTER_TEST(main_header_compiles);