AI review of 2026-11-21_20-29-02-3565303ef406-results.txt PR: #9037 https://github.com/cppcheck-opensource/cppcheck/pull/9037 Tested: 3565303ef40679fbbd4f85b883643c6637b09916 Merge base: e1b5791564c662c7dacbc62835f6abe5431aa00b Reviewed: 2026-11-24 12:15:49 UTC Model: claude-opus-5-5 (effort high) Results: 3 reviewed of 3 in the report Verdicts: 3 regression Tokens: 6655 input, 11936 cache read, 5968 cache write, 2213 output The verdicts are written by AI and can be wrong. ---- 1 / 3 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/h/hdf5/hdf5_2.2.0+repack.orig.tar.gz Result: your hdf5-2.2.0+repack/src/H5FDmulti.c:828:9: portability:inconclusive: Array 'in_use' might be filled incompletely. Did you forget to multiply the size given to 'memset()' with 'sizeof(*in_use)'? [incompleteArrayFill] Explanation: `in_use` is a local bool array, and the code calls `memset(in_use, 0, sizeof in_use)`. `sizeof` applied to the array itself always gives its full byte size, whatever `sizeof(bool)` is, so the whole array is filled. The PR now resolves the array dimension, so the computed size equals the element count. That triggers the bool portability branch of incompleteArrayFill, but suggesting a multiply by `sizeof(*in_use)` would be wrong and would overflow. This is a new false positive. ---- 2 / 3 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/h/hdf5/hdf5_2.2.0+repack.orig.tar.gz Result: your hdf5-2.2.0+repack/src/H5MF.c:2613:9: portability:inconclusive: Array 'fsm_opened' might be filled incompletely. Did you forget to multiply the size given to 'memset()' with 'sizeof(*fsm_opened)'? [incompleteArrayFill] Explanation: `fsm_opened` is a local `bool` array, and it is cleared with `memset(fsm_opened, 0, sizeof(fsm_opened))`. `sizeof` on a local array is the whole array size in bytes, so the call fills the entire array on any platform, whatever `sizeof(bool)` is. The PR now makes the dimension from `H5F_MEM_PAGE_NTYPES` known and folds `sizeof(fsm_opened)` to a constant. With `sizeof(bool)==1` that constant equals the element count, so `incompleteArrayFill` wrongly concludes that the element size was not multiplied in. This new warning is a false positive. ---- 3 / 3 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/h/hdf5/hdf5_2.2.0+repack.orig.tar.gz Result: your hdf5-2.2.0+repack/src/H5MF.c:2614:9: portability:inconclusive: Array 'fsm_visited' might be filled incompletely. Did you forget to multiply the size given to 'memset()' with 'sizeof(*fsm_visited)'? [incompleteArrayFill] Explanation: `fsm_visited` is a local array `bool fsm_visited[H5F_MEM_PAGE_NTYPES]`, and the call is `memset(fsm_visited, 0, sizeof(fsm_visited))`. `sizeof` of a local array is its full byte size, so the whole array is filled whatever `sizeof(bool)` is. With the PR, the enum-based dimension is now known, so the sizeof value equals the element count when `sizeof(bool)` is 1. The bool portability variant of `incompleteArrayFill` then fires wrongly. This is a new false positive.