X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fdepends_build.c;h=24fb7ca3d68de7e281a8cdfdac123d19ea423958;hp=3cfb9c4460161475e932de455f2e5bde96c0dff7;hb=dfafd0a1f522277c9be5fc589885db38f706d108;hpb=10e5e329a1a8804ff6461e1724071364cf6be572 diff --git a/tools/ccanlint/tests/depends_build.c b/tools/ccanlint/tests/depends_build.c index 3cfb9c44..24fb7ca3 100644 --- a/tools/ccanlint/tests/depends_build.c +++ b/tools/ccanlint/tests/depends_build.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include @@ -16,7 +15,7 @@ #include #include "build.h" -static const char *can_build(struct manifest *m) +static const char *can_build(struct manifest *m UNNEEDED) { if (safe_mode) return "Safe mode enabled"; @@ -36,18 +35,17 @@ static char *build_subdir_objs(struct manifest *m, struct ccan_file *i; list_for_each(&m->c_files, i, list) { - char *fullfile = talloc_asprintf(m, "%s/%s", m->dir, i->name); + char *fullfile = tal_fmt(m, "%s/%s", m->dir, i->name); char *output; i->compiled[ctype] = temp_file(m, "", fullfile); if (!compile_object(m, fullfile, ccan_dir, compiler, flags, i->compiled[ctype], &output)) { - talloc_free(i->compiled[ctype]); + tal_free(i->compiled[ctype]); i->compiled[ctype] = NULL; - return talloc_asprintf(m, - "Dependency %s" - " did not build:\n%s", - m->modname, output); + return tal_fmt(m, + "Dependency %s did not build:\n%s", + m->modname, output); } } return NULL; @@ -78,7 +76,8 @@ char *build_submodule(struct manifest *m, const char *flags, } static void check_depends_built(struct manifest *m, - unsigned int *timeleft, struct score *score) + unsigned int *timeleft UNNEEDED, + struct score *score) { struct list_head *list; @@ -90,12 +89,12 @@ static void check_depends_built(struct manifest *m, errstr = build_submodule(i, cflags, COMPILE_NORMAL); if (errstr) { - score->error = talloc_asprintf(score, - "Dependency %s" - " did not" - " build:\n%s", - i->modname, - errstr); + score->error = tal_fmt(score, + "Dependency %s" + " did not" + " build:\n%s", + i->modname, + errstr); return; } } @@ -110,7 +109,7 @@ struct ccanlint depends_build = { .name = "Module's CCAN dependencies can be found or built", .check = check_depends_built, .can_run = can_build, - .needs = "depends_exist test_depends_exist" + .needs = "depends_exist test_depends_exist info_ported" }; REGISTER_TEST(depends_build);