]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/hash_if.c
tools: use tal instead of talloc.
[ccan] / tools / ccanlint / tests / hash_if.c
index 3eefd1fdadf51f00e8689b8cb806513c3d8015b8..78b8a9674e484dd26b3ca4b19a75ae325fcfc488 100644 (file)
@@ -1,8 +1,6 @@
 #include <tools/ccanlint/ccanlint.h>
 #include <tools/tools.h>
-#include <ccan/talloc/talloc.h>
 #include <ccan/str/str.h>
-#include <ccan/str_talloc/str_talloc.h>
 #include <ccan/foreach/foreach.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <ctype.h>
 
 static void check_hash_if(struct manifest *m,
-                                  bool keep,
-                                  unsigned int *timeleft, struct score *score)
+                         unsigned int *timeleft, struct score *score)
 {
        struct list_head *list;
        const char *explanation =
        "\n\t(#if works like #ifdef, but with gcc's -Wundef, we can detect\n"
        "\tmistyped or unknown configuration options)";
 
+       /* We don't fail ccanlint for this. */ 
+       score->pass = true;
+
        foreach_ptr(list, &m->c_files, &m->h_files,
                    &m->run_tests, &m->api_tests,
                    &m->compile_ok_tests, &m->compile_fail_tests,
@@ -60,7 +60,6 @@ static void check_hash_if(struct manifest *m,
        }
 
        if (!score->error) {
-               score->pass = true;
                score->score = score->total;
        }
 }
@@ -69,7 +68,7 @@ struct ccanlint hash_if = {
        .key = "hash_if",
        .name = "Features are checked with #if not #ifdef",
        .check = check_hash_if,
-       .needs = ""
+       .needs = "info_exists"
 };
 
 REGISTER_TEST(hash_if);