]> git.ipfire.org Git - thirdparty/bind9.git/commit
add spatch to detect implicit bool/int/result cast
authorColin Vidal <colin@isc.org>
Tue, 14 Oct 2025 10:45:21 +0000 (12:45 +0200)
committerColin Vidal <colin@isc.org>
Wed, 12 Nov 2025 10:31:28 +0000 (11:31 +0100)
commit754595ea2d9aee4e789d6fc0f295f64f0e2312d6
tree8b0c32de2f57d2bb40b69479c1a7705e0fc10826
parentfbc9262c39174f23db2a6205346a3a8825a937a2
add spatch to detect implicit bool/int/result cast

Detection of implicit cast from a boolean into an int, or an
isc_result_t into a boolean (either in an assignement or return
position).

If such pattern is found, a warning comment is added into the code (and
the CI will fails) so the error can be spotted and manually fixed.
cocci/implicit_casts_warning.spatch [new file with mode: 0644]