]> git.ipfire.org Git - thirdparty/bind9.git/commit
[9.20] new: dev: Add spatch to detect implicit bool/int/result cast
authorColin Vidal <colin@isc.org>
Mon, 17 Nov 2025 11:44:46 +0000 (12:44 +0100)
committerColin Vidal <colin@isc.org>
Mon, 17 Nov 2025 11:44:46 +0000 (12:44 +0100)
commit02be363d1f5582a5df3375db3a18d2ebc40c34b5
tree82efa23e5938e504f094fe410eec42ec075486d5
parentf4351443a3564ce8eecd2ed98dd7a66c161301d5
parentfa45a7cc179d9aa75e88238646100059295e74e8
[9.20] new: dev: 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.

Backport of MR !11095

Merge branch 'backport-colin/cocci-detect-iscresult-int-implicit-casts-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11237