X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=test%2Fparser%2Futils.c;h=47779c86f7832fcd792fd32114c777bee569b029;hb=abf92c05c31955333719f1a83cffb0d0d194c770;hp=9d40d2b1e17bf123326e263c0307e60e92206fc6;hpb=1abc62990a5817de56a55470fb2c62e966134722;p=petitboot diff --git a/test/parser/utils.c b/test/parser/utils.c index 9d40d2b..47779c8 100644 --- a/test/parser/utils.c +++ b/test/parser/utils.c @@ -285,7 +285,7 @@ int parser_replace_file(struct discover_context *ctx, char *buf, int len) { struct parser_test *test = ctx->test_data; - struct test_file *f, *file; + struct test_file *f, *file = NULL; list_for_each_entry(&test->files, f, list) { if (f->dev != dev) @@ -310,7 +310,8 @@ int parser_replace_file(struct discover_context *ctx, } struct load_url_result *load_url_async(void *ctx, struct pb_url *url, - load_url_complete async_cb, void *async_data) + load_url_complete async_cb, void *async_data, + waiter_cb stdout_cb, void *stdout_data) { struct conf_context *conf = async_data; struct parser_test *test = conf->dc->test_data; @@ -320,6 +321,10 @@ struct load_url_result *load_url_async(void *ctx, struct pb_url *url, struct test_file *file; int fd; + /* Ignore the stdout callback for tests */ + (void)stdout_cb; + (void)stdout_data; + fd = mkstemp(tmp); if (fd < 0)