]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/ccanlint.c
compiler: use everywhere.
[ccan] / tools / ccanlint / ccanlint.c
index 78518721ef30726c7baf29bf80bd2e6625c472b1..3b7dceb23ababae98ec458d29934a49009d79523 100644 (file)
@@ -150,7 +150,7 @@ static bool run_test(struct ccanlint *i,
        else
                this_score = 0;
 
-       bad = (this_score == 0);
+       bad = (this_score == 0 && i->total_score != 0);
        good = (this_score >= i->total_score);
 
        if (verbose || (bad && !quiet)) {
@@ -237,10 +237,10 @@ static void init_tests(void)
        struct btree *keys, *names;
 
 #undef REGISTER_TEST
-#define REGISTER_TEST(name, ...) register_test(&normal_tests, &name, __VA_ARGS__)
+#define REGISTER_TEST(name, ...) register_test(&normal_tests, &name, __VA_ARGS__, NULL)
 #include "generated-normal-tests"
 #undef REGISTER_TEST
-#define REGISTER_TEST(name, ...) register_test(&compulsory_tests, &name, __VA_ARGS__)
+#define REGISTER_TEST(name, ...) register_test(&compulsory_tests, &name, __VA_ARGS__, NULL)
 #include "generated-compulsory-tests"
 
        /* Self-consistency check: make sure no two tests