Fix cppcheck warnings for 9.11
When !2472 (merged) was merged into master, one of the commits it contained (abfde3d5) was not backported to 9.11 (see !2474 (merged)) because the exact warnings reported by cppcheck for master (in lib/dns/rpz.c
) were not reported for 9.11. However, that commit contained an important change, namely it added cppcheck-specific assertion macro definitions which make cppcheck treat INSIST()
, REQUIRE()
, and friends properly (as fatal upon failure).
Fast forward a few months. cppcheck 1.90 is released and it starts reporting false positives which we try to work around, without noticing that abfde3d5 is not backported to v9_11.
This MR backports abfde3d5 to v9_11 (as b53424ef) and also addresses all warnings reported with this change in place for the v9_11 branch:
-
dc336b66:
lib/dns/client.c
-
bbef05c7:
bin/named/query.c
(already fixed in master) -
a388e82b:
lib/dns/tests/rbt_serialize_test.c
(already suppressed in master)
We need to get these fixes in before fixing cppcheck issues in BIND 9.11-S.