]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Mark ForEachMacros as iterator names
authorMichal Nowak <mnowak@isc.org>
Wed, 4 Jun 2025 13:03:32 +0000 (15:03 +0200)
committerMichal Nowak <mnowak@isc.org>
Mon, 23 Jun 2025 16:18:12 +0000 (18:18 +0200)
After f10f5572ac7e0520eed4516be52df625ad56c860 spatch started reporting
the following warnings:

    Impossible: How can diff be null and have not Correct in compare_c? Tag1 ("diff token: ( VS (\nFile \"./lib/dns/include/dns/rdatasetiter.h\", line 109, column 32, charpos = 3103\n  around = '(',\n  whole content = #define DNS_RDATASETITER_FOREACH(rds)               \\\nFile \"/tmp/cocci-output-110376-c54da3-rdatasetiter.h\", line 109, column 32, charpos = 3103\n  around = '(',\n  whole content = #define DNS_RDATASETITER_FOREACH(rds)               \\\n")
    Impossible: How can diff be null and have not Correct in compare_c? Tag1 ("diff token: ( VS (\nFile \"./lib/dns/include/dns/dbiterator.h\", line 114, column 30, charpos = 3413\n  around = '(',\n  whole content = #define DNS_DBITERATOR_FOREACH(rds)               \\\nFile \"/tmp/cocci-output-110387-883f2f-dbiterator.h\", line 114, column 30, charpos = 3413\n  around = '(',\n  whole content = #define DNS_DBITERATOR_FOREACH(rds)               \\\n")

See https://github.com/coccinelle/coccinelle/issues/398.

cocci/unsigned-int.spatch

index 6ea76527d31cc3ee65e8e92eb68dc254b20ba5bc..81ee019387a45a5b191e0824f0e24f92bfbeb622 100644 (file)
@@ -1,4 +1,5 @@
 @depends on !(file in "util/models.c") && !(file in "lib/dns/sdlz.c")@
+iterator name DNS_DBITERATOR_FOREACH, DNS_RDATASET_FOREACH, DNS_RDATASETITER_FOREACH;
 @@
 
 - unsigned