AI review of 2026-11-29_17-58-19-775bfe39c08e-results.txt PR: #9089 https://github.com/cppcheck-opensource/cppcheck/pull/9089 Tested: 775bfe39c08e8ca950688d40733eececde9f4e42 Merge base: c3665c582fa5aca0dae7c7ad569292eaa013ec49 Reviewed: 2026-11-30 08:32:25 UTC Model: claude-opus-5-5 (effort high) Results: 8 reviewed of 8 in the report Verdicts: 8 improvement Tokens: 12206 input, 5216 cache read, 5216 cache write, 1024 output The verdicts are written by AI and can be wrong. ---- 1 / 8 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/crengine-ng/crengine-ng_0.9.15+ds.orig.tar.xz Result: main crengine-ng-0.9.15/crengine/src/crtxtenc.cpp:1615:18: error: Memory is allocated but not initialized: pdata [uninitdata] Explanation: `pdata` is allocated with `new[]` at line 1581 and freed with `delete[] pdata` at line 1615. Freeing the array does not read its contents, so the warning that the memory is allocated but not initialized was a false positive. The pull request treats a non-dereferencing `delete` as not reading the data, which removes this false positive. ---- 2 / 8 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/h/holotz-castle/holotz-castle_1.3.14.orig.tar.gz Result: main holotz-castle-1.3.14-src/JLib/JLib/Util/JFile.cpp:141:12: error: Memory is allocated but not initialized: buffComp [uninitdata] Explanation: At line 141, `delete[] buffComp` only frees the uninitialized array. It never reads its contents. Reporting uninitdata there was a false positive. The PR stops treating a non-dereferenced operand of `delete` as a read, which removes this false warning. ---- 3 / 8 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/h/holotz-castle/holotz-castle_1.3.14.orig.tar.gz Result: main holotz-castle-1.3.14-src/JLib/JLib/Util/JFile.cpp:230:12: error: Memory is allocated but not initialized: buffComp [uninitdata] Explanation: Line 230 is `delete[] buffComp;`. buffComp was allocated with new[] and never written, but freeing it does not read its contents. The uninitdata warning was a false positive, and the PR removes it by treating delete as a non-reading use of the pointer. ---- 4 / 8 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/h/holotz-castle/holotz-castle_1.3.14.orig.tar.gz Result: main holotz-castle-1.3.14-src/JLib/JLib/Util/JFile.cpp:237:12: error: Memory is allocated but not initialized: buffUncomp [uninitdata] Explanation: At line 237, `buffUncomp` was allocated with `new unsigned char[lenUncomp]` and is freed with `delete[]` before anything is written to it. `delete[]` releases the memory without reading its contents, so the uninitdata warning was a false positive. The PR stops treating a pointer passed to `delete` as a read of the data, which removes this false positive. ---- 5 / 8 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/m/metview/metview_5.27.0.orig.tar.gz Result: main Metview-5.27.0-Source/metview/src/XSection/Vprofile.cc:439:18: error: Memory is allocated but not initialized: values [uninitdata] Explanation: `values` is allocated with new double[ntimes] and on the error path it is only freed with `delete[] values;`. Deleting the array does not read its contents, so the uninitdata warning was a false positive. The PR stops treating `delete` of the pointer as a use of the data, which removes this false positive. ---- 6 / 8 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/q/qmltermwidget/qmltermwidget_0.2+git20220109.6322802.orig.tar.xz Result: main qmltermwidget-0.2+git20220109.6322802/lib/BlockArray.cpp:279:19: error: Memory is allocated but not initialized: buffer1 [uninitdata] Explanation: Line 279 is `delete [] buffer1;` on the error path, right after `new char[blocksize]`. Freeing memory does not read its contents, so 'Memory is allocated but not initialized' was a false positive. The PR stops treating a non-dereferenced operand of delete as a use of the data, which removes this false positive. ---- 7 / 8 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/q/qmltermwidget/qmltermwidget_0.2+git20220109.6322802.orig.tar.xz Result: main qmltermwidget-0.2+git20220109.6322802/lib/BlockArray.cpp:337:19: error: Memory is allocated but not initialized: buffer1 [uninitdata] Explanation: Line 337 is `delete [] buffer1;` on an early-return error path. buffer1 was allocated with new char[] and never written. Deleting uninitialized memory frees it without reading its contents, so this is not a use of uninitialized data. The old uninitdata warning was a false positive, and the PR correctly removes it. ---- 8 / 8 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/q/qmltermwidget/qmltermwidget_0.2+git20220109.6322802.orig.tar.xz Result: main qmltermwidget-0.2+git20220109.6322802/lib/BlockArray.cpp:338:19: error: Memory is allocated but not initialized: buffer2 [uninitdata] Explanation: `buffer2` is allocated with `new char[blocksize]` and freed with `delete [] buffer2` on the error path before anything is written to it. Deallocating a pointer does not read the uninitialized contents, so the uninitdata warning was a false positive. The PR stops treating `delete` of a non-dereferenced pointer as a read, which removes it.