X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fhash_if.c;h=9e10c3049e2d4132b9a3a068400212399cfe171b;hp=3eefd1fdadf51f00e8689b8cb806513c3d8015b8;hb=03c49198146e11e579a7bbc4d9df27cc71dba034;hpb=9450cb3c1dff76e09305d18687291bce4221e9b6 diff --git a/tools/ccanlint/tests/hash_if.c b/tools/ccanlint/tests/hash_if.c index 3eefd1fd..9e10c304 100644 --- a/tools/ccanlint/tests/hash_if.c +++ b/tools/ccanlint/tests/hash_if.c @@ -25,6 +25,9 @@ static void check_hash_if(struct manifest *m, "\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 +63,6 @@ static void check_hash_if(struct manifest *m, } if (!score->error) { - score->pass = true; score->score = score->total; } } @@ -69,7 +71,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);