From 79c5dd6d4568c796fc3a0260092b0e82ca23261d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 6 Dec 2010 12:50:45 +1030 Subject: [PATCH] ccanlint: show example we actually compiled when we report warnings. --- tools/ccanlint/tests/examples_compile.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/ccanlint/tests/examples_compile.c b/tools/ccanlint/tests/examples_compile.c index ae0d16d6..5aeabed3 100644 --- a/tools/ccanlint/tests/examples_compile.c +++ b/tools/ccanlint/tests/examples_compile.c @@ -529,7 +529,14 @@ static void build_examples(struct manifest *m, bool keep, warnings = true; score->error = "Compiling extracted example" " gave warnings"; - score_file_error(score, file[j], 0, err[j]); + error = talloc_asprintf(score, + "Example:\n" + "%s\n" + "Compiler:\n" + "%s", + get_ccan_file_contents(file[j]), + err[j]); + score_file_error(score, file[j], 0, error); goto next; } } -- 2.39.2