]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/examples_compile.c
compiler: shorten names of attributes, add UNUSED
[ccan] / tools / ccanlint / tests / examples_compile.c
index f9a919a1bfcf7d83748d026e79ec8eb2dd278601..80c5ba631375e58bd24d78463b6aa65139434679 100644 (file)
@@ -446,8 +446,8 @@ static void *build_examples(struct manifest *m, bool keep,
 
        examples_compile.total_score = 0;
        list_for_each(&m->examples, i, list) {
-               char *ret, *ret1 = NULL, *ret2;
-               struct ccan_file *mangle1 = NULL, *mangle2;
+               char *ret, *ret1, *ret2 = NULL;
+               struct ccan_file *mangle1, *mangle2 = NULL;
 
                examples_compile.total_score++;
                /* Simplify our dumb parsing. */
@@ -473,7 +473,7 @@ static void *build_examples(struct manifest *m, bool keep,
                        char **new = combine(i, get_ccan_file_lines(i), prev);
 
                        mangle2 = mangle_example(m, i, new, keep);
-                       ret2 = compile(i, m, mangle1, keep);
+                       ret2 = compile(i, m, mangle2, keep);
                        if (!ret2) {
                                prev = new;
                                score->score++;
@@ -498,9 +498,9 @@ static void *build_examples(struct manifest *m, bool keep,
 
                if (mangle2) {
                        score->errors = talloc_asprintf_append(score->errors,
-                                      "%s\n"
                                       "%s: tried combining with"
                                       " previous example:\n"
+                                      "%s\n"
                                       "Errors: %s\n\n",
                                       i->name,
                                       get_ccan_file_contents(mangle2),