AI review of 2026-11-25_22-04-05-ec82405ff23b-results.txt PR: #9060 https://github.com/cppcheck-opensource/cppcheck/pull/9060 Tested: ec82405ff23b0b53de99c1806e6b164410b58656 Merge base: e1b5791564c662c7dacbc62835f6abe5431aa00b Reviewed: 2026-11-27 03:17:56 UTC Model: claude-opus-5-5 (effort high) Results: 47 reviewed of 47 in the report Verdicts: 42 improvement, 5 regression Tokens: 172068 input, 2478960 cache read, 110176 cache write, 11393 output The verdicts are written by AI and can be wrong. ---- 1 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/colpack/colpack_1.0.10.orig.tar.gz Result: main ColPack-1.0.10/Recovery/HessianRecovery.cpp:1228:27: warning: The address of variable 'vli_GroupedInducedVertexDegrees' might be accessed at non-zero index. [objectIndex] ColPack-1.0.10/Recovery/HessianRecovery.cpp:1227:75: note: Iterator to container is created here. ColPack-1.0.10/Recovery/HessianRecovery.cpp:1228:27: note: The address of variable 'vli_GroupedInducedVertexDegrees' might be accessed at non-zero index. Explanation: `vlit_VertexLocations` is a container of list iterators, so `vlit_VertexLocations[i_ParentVertex]` calls the container's operator[]. It is not raw pointer indexing of a variable's address. main took the iterator lifetime stored in the element (created from `vli_GroupedInducedVertexDegrees[...].end()`) and wrongly reported indexing the address of `vli_GroupedInducedVertexDegrees` at a non-zero index. The PR adds a check in objectIndex that skips objects whose value type is not a pointer, so this false positive is gone. ---- 2 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/colpack/colpack_1.0.10.orig.tar.gz Result: main ColPack-1.0.10/Recovery/HessianRecovery.cpp:1659:27: warning: The address of variable 'vli_GroupedInducedVertexDegrees' might be accessed at non-zero index. [objectIndex] ColPack-1.0.10/Recovery/HessianRecovery.cpp:1658:75: note: Iterator to container is created here. ColPack-1.0.10/Recovery/HessianRecovery.cpp:1659:27: note: The address of variable 'vli_GroupedInducedVertexDegrees' might be accessed at non-zero index. Explanation: `vlit_VertexLocations` is a container of list iterators, and `vlit_VertexLocations[i_ParentVertex]` calls the container's operator[]. Main took the lifetime of the iterator stored at line 1658 as the address of the variable `vli_GroupedInducedVertexDegrees` and warned that this address may be indexed at a non-zero index. The object being indexed is a container, not a raw pointer to that variable, so the objectIndex warning was a false positive. The PR skips objectIndex when the indexed object is not a pointer (`valueType()->pointer == 0`), which removes this false positive. ---- 3 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/colpack/colpack_1.0.10.orig.tar.gz Result: main ColPack-1.0.10/Recovery/HessianRecovery.cpp:849:27: warning: The address of variable 'vli_GroupedInducedVertexDegrees' might be accessed at non-zero index. [objectIndex] ColPack-1.0.10/Recovery/HessianRecovery.cpp:848:75: note: Iterator to container is created here. ColPack-1.0.10/Recovery/HessianRecovery.cpp:849:27: note: The address of variable 'vli_GroupedInducedVertexDegrees' might be accessed at non-zero index. Explanation: Line 849 decrements an iterator stored in vlit_VertexLocations, a container of list iterators. The index is vi_InducedVertexDegrees[i_ParentVertex], and the indexed object is vli_GroupedInducedVertexDegrees, a vector of lists. Indexing a container calls operator[]. It does not offset into the address of a single variable. So 'The address of variable might be accessed at non-zero index' is a false positive. The PR skips objectIndex when the indexed object is not a pointer (valueType pointer == 0), which removes this warning correctly. ---- 4 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/f/fast5/fast5_0.6.5.orig.tar.gz Result: main fast5-0.6.5/src/tmp.cpp:199:29: warning: The address of variable 'a_v' might be accessed at non-zero index. [objectIndex] fast5-0.6.5/src/tmp.cpp:199:41: note: Pointer to container is created here. fast5-0.6.5/src/tmp.cpp:199:29: note: The address of variable 'a_v' might be accessed at non-zero index. Explanation: The line `charptr_buff[i] = a_v[i].val_5.data();` indexes `charptr_buff`, which is a `std::vector`. That calls `vector::operator[]`; it is not pointer arithmetic on the address of a single object. Main apparently attached a lifetime value for `a_v` to `charptr_buff` and then reported objectIndex, claiming the address of `a_v` is accessed at a non-zero index. That is a false positive. The PR's new check in objectIndex skips indexed objects that are not pointers (valueType pointer == 0), and a vector is not a pointer, so the false positive is gone. ---- 5 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/f/feather-wallet/feather-wallet_2.8.1+dfsg.orig.tar.xz Result: main feather-2.8.1/monero/tests/unit_tests/ringct.cpp:1266:7: warning: The address of variable 's' might be accessed at non-zero index. [objectIndex] feather-2.8.1/monero/tests/unit_tests/ringct.cpp:1266:13: note: Address of variable taken here. feather-2.8.1/monero/tests/unit_tests/ringct.cpp:1266:7: note: The address of variable 's' might be accessed at non-zero index. Explanation: `sp` is a std::vector, so `sp[n]` calls the container's operator[]; it is not raw pointer indexing of `&s[n]`. The objectIndex warning was a false positive. It is also wrong on its own terms, because `&s[n]` is the address of a vector element. The PR's new check skips indexing on objects whose valueType has pointer == 0 (a container or class), and that removes this false positive. ---- 6 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/f/filament/filament_1.9.25+dfsg3.orig.tar.xz Result: main filament-1.9.25/libs/imageio/src/ImageDecoder.cpp:277:24: warning: The address of variable 'imageData' might be accessed at non-zero index. [objectIndex] filament-1.9.25/libs/imageio/src/ImageDecoder.cpp:277:30: note: Address of variable taken here. filament-1.9.25/libs/imageio/src/ImageDecoder.cpp:277:24: note: The address of variable 'imageData' might be accessed at non-zero index. Explanation: `imageData` is a `std::unique_ptr`, which is not a pointer type. `imageData[y * rowBytes]` calls `unique_ptr::operator[]` and indexes the heap array that `make_unique` allocated with `height*rowBytes` elements. It does not index the address of the `imageData` variable itself. The objectIndex warning was therefore a false positive. The PR now skips objects whose valueType has pointer == 0, and that removes it. ---- 7 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/f/filament/filament_1.9.25+dfsg3.orig.tar.xz Result: main filament-1.9.25/libs/imageio/src/ImageEncoder.cpp:405:25: warning: The address of variable 'data' might be accessed at non-zero index. [objectIndex] filament-1.9.25/libs/imageio/src/ImageEncoder.cpp:406:22: note: Address of variable taken here. filament-1.9.25/libs/imageio/src/ImageEncoder.cpp:405:25: note: The address of variable 'data' might be accessed at non-zero index. Explanation: `data` is a `std::unique_ptr`, and `data[i]` calls `unique_ptr::operator[]` to index the heap array it owns. It does not index the address of the local variable `data`. The objectIndex warning was a false positive. The new check in objectIndex skips objects whose valueType is not a pointer, and that removes it correctly. ---- 8 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gdal/gdal_3.13.3+dfsg.orig.tar.xz Result: main gdal-3.13.3/frmts/grok/grkdatasetbase.h:1314:22: warning: The address of variable 'entries' might be accessed at non-zero index. [objectIndex] gdal-3.13.3/frmts/grok/grkdatasetbase.h:1313:44: note: Pointer to container is created here. gdal-3.13.3/frmts/grok/grkdatasetbase.h:1314:22: note: The address of variable 'entries' might be accessed at non-zero index. Explanation: The removed warning points at `asocs[i]` on line 1314. `asocs` is a `std::vector` sized to `entries.size()`, so `asocs[i]` is a normal container `operator[]` access. It is not an index into the address of a single object. Cppcheck confused the lifetime values coming from `entries[i].label.c_str()` / `xml.data()` with the indexed object. The PR now skips objectIndex when the indexed object is not a pointer (`valueType()->pointer == 0`), which removes this false positive. ---- 9 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gdal/gdal_3.13.3+dfsg.orig.tar.xz Result: main gdal-3.13.3/frmts/hdf5/hdf5multidim.cpp:2318:31: warning: The address of variable 'abyTemp' might be accessed at non-zero index. [objectIndex] gdal-3.13.3/frmts/hdf5/hdf5multidim.cpp:2411:20: note: Address of variable taken here. gdal-3.13.3/frmts/hdf5/hdf5multidim.cpp:2411:20: note: Calling function 'CopyBuffer', 6th argument '&abyTemp[0]' value is lifetime=abyTemp gdal-3.13.3/frmts/hdf5/hdf5multidim.cpp:2318:31: note: The address of variable 'abyTemp' might be accessed at non-zero index. Explanation: Line 2318 indexes `pabySrcBufferStack`, a local `std::vector`. That calls `vector::operator[]`; it is not pointer arithmetic on the address of `abyTemp`. Main reported objectIndex because a lifetime value for `abyTemp` (passed in as `&abyTemp[0]`) ended up attached to the vector. Even so, `&abyTemp[0]` points into the heap buffer of a vector, and indexing it at a non-zero position is valid. The PR skips objectIndex when the indexed object is not a pointer, so this false positive is removed. ---- 10 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/g/gdal/gdal_3.13.3+dfsg.orig.tar.xz Result: main gdal-3.13.3/frmts/zarr/zarr_v3_codec_sharding.cpp:1099:22: warning: The address of variable 'aLocations' might be accessed at non-zero index. [objectIndex] gdal-3.13.3/frmts/zarr/zarr_v3_codec_sharding.cpp:1099:28: note: Address of variable taken here. gdal-3.13.3/frmts/zarr/zarr_v3_codec_sharding.cpp:1099:22: note: The address of variable 'aLocations' might be accessed at non-zero index. Explanation: `aLocations` is a container (it is range-iterated with `for (auto &loc : aLocations)` and indexed per request), not a pointer to a single object. `&aLocations[i]` takes the address of element i through `operator[]`, so indexing at a non-zero i is valid. The old objectIndex warning came from treating the container's lifetime as a single-object address. The new check in objectIndex skips objects whose valueType is not a pointer, which removes this false positive. ---- 11 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: main intel-compute-runtime-6c940d1/level_zero/sysman/test/unit_tests/sources/pci/linux/test_zes_pci.cpp:534:18: warning: The address of variable 'props12' might be accessed at non-zero index. [objectIndex] intel-compute-runtime-6c940d1/level_zero/sysman/test/unit_tests/sources/pci/linux/test_zes_pci.cpp:535:50: note: Address of variable taken here. intel-compute-runtime-6c940d1/level_zero/sysman/test/unit_tests/sources/pci/linux/test_zes_pci.cpp:534:18: note: The address of variable 'props12' might be accessed at non-zero index. Explanation: props12 and pBarProps are std::vector objects. pBarProps[i] calls vector::operator[], so it is not raw indexing of an object's address. The old objectIndex warning came from mistaking this for indexing at a non-zero offset of the address of 'props12'. It was a false positive. The PR skips objectIndex when the indexed object is not a pointer (valueType()->pointer == 0), which removes it. ---- 12 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: main intel-compute-runtime-6c940d1/level_zero/sysman/test/unit_tests/sources/pci/linux/test_zes_pci.cpp:568:18: warning: The address of variable 'props12' might be accessed at non-zero index. [objectIndex] intel-compute-runtime-6c940d1/level_zero/sysman/test/unit_tests/sources/pci/linux/test_zes_pci.cpp:569:50: note: Address of variable taken here. intel-compute-runtime-6c940d1/level_zero/sysman/test/unit_tests/sources/pci/linux/test_zes_pci.cpp:568:18: note: The address of variable 'props12' might be accessed at non-zero index. Explanation: `props12` and `pBarProps` are std::vector objects. Indexing them with `[i]` calls `operator[]` and stays within bounds, since `i < count` and both vectors have `count` elements. The old objectIndex warning wrongly treated `pBarProps[i]` as indexing the address of the variable `props12`. That lifetime came from `pNext = &props12[i]`. The PR now skips objectIndex when the indexed object is not a pointer (valueType pointer == 0), so this false positive is gone. ---- 13 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: main intel-compute-runtime-6c940d1/level_zero/tools/test/black_box_tests/zello_sysman.cpp:594:20: warning: The address of variable 'pciBarExtProps' might be accessed at non-zero index. [objectIndex] intel-compute-runtime-6c940d1/level_zero/tools/test/black_box_tests/zello_sysman.cpp:595:52: note: Address of variable taken here. intel-compute-runtime-6c940d1/level_zero/tools/test/black_box_tests/zello_sysman.cpp:594:20: note: The address of variable 'pciBarExtProps' might be accessed at non-zero index. Explanation: pciBarProps and pciBarExtProps are std::vector objects. Indexing them with pciBarProps[i] / pciBarExtProps[i] calls the container's operator[]. Storing &pciBarExtProps[i] (the address of an element) does not turn the vector into a single object that is indexed out of range. The old objectIndex warning was a false positive. The PR now skips objectIndex when the indexed object is not a pointer (valueType pointer == 0), which removes this false warning. ---- 14 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: main intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/engine/linux/mock_engine_prelim.h:85:23: warning: The address of variable 'distanceInfos' might be accessed at non-zero index. [objectIndex] intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/engine/linux/mock_engine_prelim.h:88:64: note: Address of variable taken here. intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/engine/linux/mock_engine_prelim.h:85:23: note: The address of variable 'distanceInfos' might be accessed at non-zero index. Explanation: queryItems is a std::vector, and distanceInfos is a std::vector. queryItems[i] calls the vector's operator[] and indexes its elements. It does not index the address of the variable distanceInfos, so the objectIndex warning was a false positive. It came from storing &distanceInfos[i] in dataPtr. The PR now skips objectIndex when the indexed object is not a pointer (valueType()->pointer == 0), which removes this false positive. ---- 15 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: main intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/pci/linux/test_zes_pci.cpp:540:18: warning: The address of variable 'props12' might be accessed at non-zero index. [objectIndex] intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/pci/linux/test_zes_pci.cpp:541:50: note: Address of variable taken here. intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/pci/linux/test_zes_pci.cpp:540:18: note: The address of variable 'props12' might be accessed at non-zero index. Explanation: `props12` is a `std::vector`. `props12[i]` calls the vector's `operator[]` and stays within the `count` elements. Taking `&props12[i]` does not take the address of a scalar object that is then indexed out of bounds. The objectIndex warning was a false positive. The PR now skips objects whose valueType is not a pointer (container or class) in objectIndex, so this false positive is removed. ---- 16 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: main intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/pci/linux/test_zes_pci.cpp:574:18: warning: The address of variable 'props12' might be accessed at non-zero index. [objectIndex] intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/pci/linux/test_zes_pci.cpp:575:50: note: Address of variable taken here. intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/pci/linux/test_zes_pci.cpp:574:18: note: The address of variable 'props12' might be accessed at non-zero index. Explanation: The warning is at line 574, `pBarProps[i]`, where `pBarProps` is a `std::vector`. Indexing a vector calls `operator[]`, so this is not indexing the address of a single object. Main mixed up lifetimes: it treated `pBarProps` as holding the address of `props12`, because of the `pNext = &props12[i]` assignment, and then reported an objectIndex on a vector subscript. That is a false positive. The PR adds a check in objectIndex that skips non-pointer objects, since their `[]` is `operator[]`. Removing this warning is correct. ---- 17 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: main intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/pci/windows/test_zes_pci.cpp:169:18: warning: The address of variable 'props1dot2' might be accessed at non-zero index. [objectIndex] intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/pci/windows/test_zes_pci.cpp:170:50: note: Address of variable taken here. intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/pci/windows/test_zes_pci.cpp:169:18: note: The address of variable 'props1dot2' might be accessed at non-zero index. Explanation: `pBarProps` is a `std::vector`. Line 170 stores `&props1dot2[i]` (the address of an element of another vector) into `pBarProps[i].pNext`. Main then treated `pBarProps[i]` at line 169 as indexing "the address of variable 'props1dot2'" at a non-zero index. That is a false positive: indexing the vector calls `operator[]`, and the address is of a vector element, not of a scalar variable. The PR now skips `objectIndex` when the indexed object is not a pointer, which removes this bogus warning. ---- 18 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: main intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/pci/windows/test_zes_pci.cpp:211:18: warning: The address of variable 'props1dot2' might be accessed at non-zero index. [objectIndex] intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/pci/windows/test_zes_pci.cpp:212:50: note: Address of variable taken here. intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/pci/windows/test_zes_pci.cpp:211:18: note: The address of variable 'props1dot2' might be accessed at non-zero index. Explanation: `pBarProps` is a `std::vector`, so `pBarProps[i]` calls `vector::operator[]`. It is not pointer arithmetic on the address of `props1dot2`. The old warning came from the lifetime of `&props1dot2[i]`, which is stored into `pBarProps[i].pNext` and so ends up associated with the vector object `pBarProps`. objectIndex then wrongly treated indexing `pBarProps` as indexing the address of the variable `props1dot2`. The PR now skips objectIndex when the indexed object is not a pointer (valueType pointer == 0), which removes this false positive. ---- 19 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/i/intel-compute-runtime-legacy/intel-compute-runtime-legacy_24.35.30872.45.orig.tar.gz Result: main intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/scheduler/linux/mock_sysfs_scheduler_prelim.h:74:23: warning: The address of variable 'distanceInfos' might be accessed at non-zero index. [objectIndex] intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/scheduler/linux/mock_sysfs_scheduler_prelim.h:77:64: note: Address of variable taken here. intel-compute-runtime-6c940d1/level_zero/tools/test/unit_tests/sources/sysman/scheduler/linux/mock_sysfs_scheduler_prelim.h:74:23: note: The address of variable 'distanceInfos' might be accessed at non-zero index. Explanation: `queryItems` is a `std::vector`, so `queryItems[i]` calls the vector's `operator[]` and is a valid element access. It does not index into the address of `distanceInfos`. The warning came from a confused lifetime: `&distanceInfos[i]` is stored into an element of `queryItems`. The PR skips objectIndex when the indexed object is not a pointer (`valueType()->pointer == 0`), which removes this false positive. ---- 20 / 47 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/kf6-kcoreaddons/kf6-kcoreaddons_6.32.0.orig.tar.xz Result: your kcoreaddons-6.32.0/src/lib/io/kdirwatch.cpp:1128:32: error: Iterators of different containers 'it.value()' and 'entry.m_clients' are used together. [mismatchingContainers] Explanation: `entry` is a reference to `it.value()`. `entry.findInstance(instance)` returns an iterator into `entry.m_clients`, and the code compares it with `entry.m_clients.end()`. Both iterators belong to the same container, so the code is correct. The PR's changes to lifetime kinds (Object/Iterator propagation through member function returns and through references) now wrongly attribute the iterator's container to `it.value()`. The new mismatchingContainers error is therefore a false positive. ---- 21 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/kf6-ktexteditor/kf6-ktexteditor_6.32.0.orig.tar.xz Result: main ktexteditor-6.32.0/src/utils/katetemplatehandler.cpp:583:40: warning: The address of variable 'm_fields' might be accessed at non-zero index. [objectIndex] ktexteditor-6.32.0/src/utils/katetemplatehandler.cpp:575:16: note: Assigned to reference. ktexteditor-6.32.0/src/utils/katetemplatehandler.cpp:576:39: note: Address of variable taken here. ktexteditor-6.32.0/src/utils/katetemplatehandler.cpp:576:39: note: Added to container 'fieldsLookup'. ktexteditor-6.32.0/src/utils/katetemplatehandler.cpp:575:22: note: Assuming condition is true ktexteditor-6.32.0/src/utils/katetemplatehandler.cpp:582:30: note: Assuming container is not empty ktexteditor-6.32.0/src/utils/katetemplatehandler.cpp:583:40: note: The address of variable 'm_fields' might be accessed at non-zero index. Explanation: `fieldsLookup` is a `QMap`. `fieldsLookup[fieldId]` calls `QMap::operator[]`, which looks up a key. It is not pointer arithmetic on the address of `m_fields`, so the objectIndex warning was a false positive. The PR's new check in objectIndex skips objects whose value type is not a pointer (`pointer == 0`). That covers this class-type container, so the false positive is removed. ---- 22 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/ksyntax-highlighting/ksyntax-highlighting_5.116.0.orig.tar.xz Result: main syntax-highlighting-5.116.0/src/indexer/katehighlightingindexer.cpp:2414:29: error: The address of variable 'context.rules.begin' is accessed at non-zero index. [objectIndex] syntax-highlighting-5.116.0/src/indexer/katehighlightingindexer.cpp:2401:75: note: Passed to reference. syntax-highlighting-5.116.0/src/indexer/katehighlightingindexer.cpp:2409:26: note: Iterator to container is created here. syntax-highlighting-5.116.0/src/indexer/katehighlightingindexer.cpp:2414:29: note: The address of variable 'context.rules.begin' is accessed at non-zero index. Explanation: `it` is an iterator from `context.rules.begin()`. The loop condition `it < end` with `end = rules.end() - 1` ensures `it[1]` is always a valid element. It is not an out-of-bounds access of a single object's address, so the objectIndex warning was a false positive. The PR's new check in objectIndex skips non-pointer objects such as iterators and views, where indexing calls `operator[]`. That removes this false positive. ---- 23 / 47 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/kwin/kwin_6.7.4.orig.tar.xz Result: your kwin-6.7.4/src/wayland/plasmavirtualdesktop.cpp:162:14: error: Iterators of different containers 'd' and 'd->desktops' are used together. [mismatchingContainers] Explanation: `d->constFindDesktop(id)` is a private-class helper that returns `std::find_if(desktops.constBegin(), desktops.constEnd(), ...)`. That is an iterator into `d->desktops`, and comparing it with `d->desktops.constEnd()` is correct. The PR changed how member-function return lifetimes are stored: the kind of the returned expression (here Iterator) is now propagated, but it is tied to the object the function is called on (`d`), not to the member container `desktops`. The mismatchingContainers check therefore thinks the iterator belongs to container `d` and wrongly reports a mismatch with `d->desktops`. This is a new false positive. ---- 24 / 47 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/kwin/kwin_6.7.4.orig.tar.xz Result: your kwin-6.7.4/src/wayland/plasmavirtualdesktop.cpp:171:14: error: Iterators of different containers 'd' and 'd->desktops' are used together. [mismatchingContainers] Explanation: `d->constFindDesktop(id)` is a member of the private class. It returns an iterator into the private class's own `desktops` list, so comparing it with `d->desktops.constEnd()` is correct. The PR changed which lifetime kind is given to the result of a member function whose return depends on `this`. Cppcheck now attributes the iterator to container `d` (the d-pointer) instead of `d->desktops`, and so reports a spurious mismatchingContainers error. This is a new false positive. ---- 25 / 47 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/kwin/kwin_6.7.4.orig.tar.xz Result: your kwin-6.7.4/src/wayland/plasmavirtualdesktop.cpp:203:19: error: Iterators of different containers 'd' and 'd->desktops' are used together. [mismatchingContainers] Explanation: `d->findDesktop(id)` is a member of the private class. It searches its own `desktops` list and returns an iterator into `d->desktops`. Comparing that iterator with `d->desktops.end()` and passing it to `d->desktops.erase()` is correct. The PR changed how lifetimes returned from member functions are tracked. Cppcheck now thinks the iterator belongs to the container `d` (the d-pointer object itself) rather than to its member `d->desktops`. It then reports a mismatchingContainers error that does not exist. This is a new false positive. ---- 26 / 47 ---- Verdict: REGRESSION (high confidence) Package: https://ftp.debian.org/debian/pool/main/k/kwin/kwin_6.7.4.orig.tar.xz Result: your kwin-6.7.4/src/wayland/plasmavirtualdesktop.cpp:209:6: error: Iterator 'deskIt' referring to container 'd' is used with container 'd->desktops'. [mismatchingContainerIterator] Explanation: `d->findDesktop(id)` is a member function of the private class that returns an iterator into `d->desktops` (a QList). Erasing that iterator from `d->desktops` is correct. The PR changed how lifetime kinds are carried through member-function returns that depend on `this`. Cppcheck now treats `deskIt` as an iterator of container `d`, which is the private object or smart pointer, instead of `d->desktops`. That is wrong: the iterator does belong to `d->desktops`, so this new mismatchingContainerIterator warning is a false positive. The related new mismatchingContainers warnings at lines 162, 171 and 203 come from the same misattribution. ---- 27 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/rna-star/rna-star_2.7.11b+dfsg.orig.tar.xz Result: main STAR-2.7.11b/source/Transcript_convertGenomeCigar.cpp:75:77: error: The address of variable 'A.cigar.begin' is accessed at non-zero index. [objectIndex] STAR-2.7.11b/source/Transcript_convertGenomeCigar.cpp:2:67: note: Passed to reference. STAR-2.7.11b/source/Transcript_convertGenomeCigar.cpp:71:18: note: Iterator to container is created here. STAR-2.7.11b/source/Transcript_convertGenomeCigar.cpp:73:26: note: Assuming condition is false STAR-2.7.11b/source/Transcript_convertGenomeCigar.cpp:75:77: note: The address of variable 'A.cigar.begin' is accessed at non-zero index. Explanation: `c0` is an iterator to `A.cigar`, a vector. `c0[-1]` calls the iterator's `operator[]`, which gives the element before `c0`. The comment says `c0` is at least `cigar.begin()+1` at that point, so this is not out-of-bounds access to a single object. The objectIndex warning wrongly treated the iterator's lifetime to the container as the address of a variable. The new check in objectIndex skips non-pointer objects, whose indexing calls operator[]. That removes this false positive. ---- 28 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/rna-star/rna-star_2.7.11b+dfsg.orig.tar.xz Result: main STAR-2.7.11b/source/Transcript_convertGenomeCigar.cpp:78:19: error: The address of variable 'A.cigar.begin' is accessed at non-zero index. [objectIndex] STAR-2.7.11b/source/Transcript_convertGenomeCigar.cpp:2:67: note: Passed to reference. STAR-2.7.11b/source/Transcript_convertGenomeCigar.cpp:71:18: note: Iterator to container is created here. STAR-2.7.11b/source/Transcript_convertGenomeCigar.cpp:73:26: note: Assuming condition is false STAR-2.7.11b/source/Transcript_convertGenomeCigar.cpp:75:72: note: Assuming condition is true STAR-2.7.11b/source/Transcript_convertGenomeCigar.cpp:78:19: note: The address of variable 'A.cigar.begin' is accessed at non-zero index. Explanation: `c0` is an iterator (`auto c0 = A.cigar.begin()`), a class type with pointer == 0. So `c0[-1]` calls the iterator's operator[], not array indexing on the address of a variable. The objectIndex warning about 'the address of variable A.cigar.begin' is a false positive. Also, after the loop advances, `c0` can point past the first element, so negative indexing is valid. The new check that skips non-pointer objects correctly removes it. ---- 29 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/rocksdb/rocksdb_9.11.2.orig.tar.gz Result: main facebook-rocksdb-461d7f4/db/db_compaction_test.cc:6111:20: warning: The address of variable 'limiter_settings' might be accessed at non-zero index. [objectIndex] facebook-rocksdb-461d7f4/db/db_compaction_test.cc:6109:16: note: Assigned to reference. facebook-rocksdb-461d7f4/db/db_compaction_test.cc:6111:37: note: Address of variable taken here. facebook-rocksdb-461d7f4/db/db_compaction_test.cc:6103:19: note: Assuming condition is false facebook-rocksdb-461d7f4/db/db_compaction_test.cc:6100:12: note: Assuming condition is false facebook-rocksdb-461d7f4/db/db_compaction_test.cc:6111:20: note: The address of variable 'limiter_settings' might be accessed at non-zero index. Explanation: `cf_to_limiter` is a `std::unordered_map`, so `cf_to_limiter[cf_names[cf]]` calls the map's `operator[]` with a string key. It does not index a pointer to `limiter_settings`, so the objectIndex warning was a false positive. The PR's new check in objectIndex skips objects whose valueType has no pointer indirection, such as this container. That is exactly why the warning disappears. ---- 30 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/ruby-re2/ruby-re2_2.29.0.orig.tar.gz Result: main re2-2.29.0/ext/re2/re2.cc:596:9: warning: The address of variable 'matches' might be accessed at non-zero index. [objectIndex] re2-2.29.0/ext/re2/re2.cc:596:15: note: Address of variable taken here. re2-2.29.0/ext/re2/re2.cc:596:9: note: The address of variable 'matches' might be accessed at non-zero index. Explanation: `argv`, `args` and `matches` are std::vector objects. In `argv[i] = &matches[i]`, the expression `argv[i]` calls vector::operator[], so it is not pointer arithmetic on the address of a single object. The objectIndex warning about 'matches' at 596:9 was therefore a false positive. It appeared because the new lifetime tracking made `argv` look like it held the address of `matches`. The PR adds a guard to objectIndex that skips non-pointer objects, since indexing them calls operator[]. That guard removes this false positive. ---- 31 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/ruby-re2/ruby-re2_2.29.0.orig.tar.gz Result: main re2-2.29.0/ext/re2/re2.cc:597:20: warning: The address of variable 'matches' might be accessed at non-zero index. [objectIndex] re2-2.29.0/ext/re2/re2.cc:596:15: note: Address of variable taken here. re2-2.29.0/ext/re2/re2.cc:597:20: note: The address of variable 'matches' might be accessed at non-zero index. Explanation: The objectIndex warning at 597:20 points at `argv[i]`, where `argv` is a `std::vector`. Indexing it calls `std::vector::operator[]`; it is not raw pointer arithmetic on the address of `matches`. Earlier, `argv[i] = &matches[i]` gave `argv` a lifetime pointing at `matches`, and Cppcheck wrongly treated the later `argv[i]` as indexing that address. The warning is a false positive. The new check in objectIndex skips objects whose valueType is not a pointer (`pointer == 0`), which removes it. ---- 32 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/r/ruby-re2/ruby-re2_2.29.0.orig.tar.gz Result: main re2-2.29.0/ext/re2/re2.cc:597:9: warning: The address of variable 'argv' might be accessed at non-zero index. [objectIndex] re2-2.29.0/ext/re2/re2.cc:597:15: note: Address of variable taken here. re2-2.29.0/ext/re2/re2.cc:597:9: note: The address of variable 'argv' might be accessed at non-zero index. Explanation: `argv` is a std::vector, and `argv[i]` calls the vector's operator[] with an index inside the bounds. It is not an object reached through a pointer, so the objectIndex warning was a false positive. It most likely came from the lifetime of `argv` that the assignment `args[i] = &argv[i]` sets up. The PR's new check in objectIndex skips indexed objects whose valueType is not a pointer (pointer == 0), which removes this false positive. ---- 33 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/s/sga/sga_0.10.15.orig.tar.gz Result: main sga-0.10.15/src/Util/MultiAlignment.cpp:144:31: warning: The address of variable 'rootData' might be accessed at non-zero index. [objectIndex] sga-0.10.15/src/Util/MultiAlignment.cpp:119:22: note: Address of variable taken here. sga-0.10.15/src/Util/MultiAlignment.cpp:119:22: note: Passed to constructor of 'CigarIter'. sga-0.10.15/src/Util/MultiAlignment.cpp:120:23: note: Added to container 'iterVec'. sga-0.10.15/src/Util/MultiAlignment.cpp:122:18: note: Assuming condition is true sga-0.10.15/src/Util/MultiAlignment.cpp:129:22: note: Assuming condition is true sga-0.10.15/src/Util/MultiAlignment.cpp:125:25: note: Assuming condition is true sga-0.10.15/src/Util/MultiAlignment.cpp:144:31: note: The address of variable 'rootData' might be accessed at non-zero index. Explanation: iterVec is a std::vector (CigarIterVector). Indexing it with iterVec[i] calls std::vector::operator[], so it does not do pointer arithmetic on &rootData. The address of rootData is only stored as a member of a CigarIter element. The objectIndex warning was a false positive. The PR's new check skips non-pointer objects in objectIndex, which removes it. ---- 34 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/u/uhd/uhd_4.9.0.1.orig.tar.xz Result: main EttusResearch-uhd-509cd79/host/utils/converter_benchmark.cpp:387:23: warning: The address of variable 'input_buffers' might be accessed at non-zero index. [objectIndex] EttusResearch-uhd-509cd79/host/utils/converter_benchmark.cpp:387:59: note: Address of variable taken here. EttusResearch-uhd-509cd79/host/utils/converter_benchmark.cpp:387:23: note: The address of variable 'input_buffers' might be accessed at non-zero index. Explanation: `input_buf_refs` is a `std::vector`, and `input_buf_refs[i]` calls `std::vector::operator[]`. It does not do pointer arithmetic on the address of `input_buffers`. The objectIndex warning was a false positive: indexing a vector of vectors with i is valid. The PR now skips objectIndex when the indexed object is not a pointer (`valueType()->pointer == 0`), which removes this false positive. ---- 35 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/u/uhd/uhd_4.9.0.1.orig.tar.xz Result: main EttusResearch-uhd-509cd79/host/utils/converter_benchmark.cpp:390:24: warning: The address of variable 'output_buffers' might be accessed at non-zero index. [objectIndex] EttusResearch-uhd-509cd79/host/utils/converter_benchmark.cpp:390:54: note: Address of variable taken here. EttusResearch-uhd-509cd79/host/utils/converter_benchmark.cpp:390:24: note: The address of variable 'output_buffers' might be accessed at non-zero index. Explanation: `output_buf_refs` is a `std::vector`, and `output_buf_refs[i]` calls `vector::operator[]`. It is not raw pointer arithmetic on the address of `output_buffers`. The pointer `&output_buffers[i][0]` points to element 0 of an inner vector, and indexing a vector of size n_outputs is valid. The objectIndex warning was a false positive. The PR's new check in objectIndex skips objects whose type is not a pointer, and that removes it. ---- 36 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/webkit2gtk/webkit2gtk_2.54.3.orig.tar.xz Result: main webkitgtk-2.54.3/Source/ThirdParty/ANGLE/src/common/vulkan/vulkan_icd.cpp:248:40: warning: The address of variable 'allDriverProps' might be accessed at non-zero index. [objectIndex] webkitgtk-2.54.3/Source/ThirdParty/ANGLE/src/common/vulkan/vulkan_icd.cpp:252:31: note: Address of variable taken here. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/src/common/vulkan/vulkan_icd.cpp:248:40: note: The address of variable 'allDriverProps' might be accessed at non-zero index. Explanation: `allDriverProps` is a `std::vector`, and `allDriverProps[i]` calls `vector::operator[]`. It is not pointer arithmetic on the address of a single object. The objectIndex warning at line 248 is a false positive: storing `&allDriverProps[i]` into `pNext` does not turn the vector into a single object that is indexed out of range. The new check in objectIndex skips objects whose value type is not a pointer, which removes this false positive. ---- 37 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/webkit2gtk/webkit2gtk_2.54.3.orig.tar.xz Result: main webkitgtk-2.54.3/Source/ThirdParty/ANGLE/src/common/vulkan/vulkan_icd.cpp:250:19: warning: The address of variable 'allDriverProps' might be accessed at non-zero index. [objectIndex] webkitgtk-2.54.3/Source/ThirdParty/ANGLE/src/common/vulkan/vulkan_icd.cpp:252:31: note: Address of variable taken here. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/src/common/vulkan/vulkan_icd.cpp:250:19: note: The address of variable 'allDriverProps' might be accessed at non-zero index. Explanation: At line 250, allIDProps[i] indexes a std::vector, which calls operator[] and returns an element. The pointer stored in allIDProps[i].pNext is the address of a vector element, &allDriverProps[i]. The objectIndex warning wrongly treats this as indexing the address of a single variable. The PR's new check skips objectIndex when the indexed object is not a pointer (valueType()->pointer == 0), so this false positive is removed. ---- 38 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/webkit2gtk/webkit2gtk_2.54.3.orig.tar.xz Result: main webkitgtk-2.54.3/Source/ThirdParty/ANGLE/src/common/vulkan/vulkan_icd.cpp:257:68: warning: The address of variable 'allIDProps' might be accessed at non-zero index. [objectIndex] webkitgtk-2.54.3/Source/ThirdParty/ANGLE/src/common/vulkan/vulkan_icd.cpp:248:29: note: Address of variable taken here. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/src/common/vulkan/vulkan_icd.cpp:257:68: note: The address of variable 'allIDProps' might be accessed at non-zero index. Explanation: `allProps`, `allIDProps` and `allDriverProps` are `std::vector` objects. `allProps[i]` and `allIDProps[i]` call `vector::operator[]`; they do not index the address of a scalar variable. The old objectIndex warning treated the vector as a single object whose address was taken (`&allIDProps[i]`) and then indexed at a non-zero index, which is wrong. The PR now skips objectIndex when the indexed object is not a pointer (valueType pointer == 0). This removes a false positive. ---- 39 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/webkit2gtk/webkit2gtk_2.54.3.orig.tar.xz Result: main webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/framework/opengl/gluRenderContext.cpp:298:19: warning: The address of variable 'extensions' might be accessed at non-zero index. [objectIndex] webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/framework/opengl/gluRenderContext.cpp:298:37: note: Pointer to container is created here. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/framework/opengl/gluRenderContext.cpp:298:19: note: The address of variable 'extensions' might be accessed at non-zero index. Explanation: Line 298 indexes `extStr` and `extensions`, which are both `std::vector` objects. The index calls `vector::operator[]`; it is not pointer arithmetic on the address of a single object. The objectIndex warning about 'extensions' was a false positive, caused by lifetime tracking that confused the container with a pointer. The PR now skips objectIndex when the indexed object's value type is not a pointer, so this false positive is removed. ---- 40 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/webkit2gtk/webkit2gtk_2.54.3.orig.tar.xz Result: main webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/framework/opengl/gluShaderProgram.cpp:414:31: warning: The address of variable 'sources.transformFeedbackVaryings' might be accessed at non-zero index. [objectIndex] webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/framework/opengl/gluShaderProgram.cpp:376:81: note: Passed to reference. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/framework/opengl/gluShaderProgram.cpp:414:72: note: Pointer to container is created here. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/framework/opengl/gluShaderProgram.cpp:414:31: note: The address of variable 'sources.transformFeedbackVaryings' might be accessed at non-zero index. Explanation: `sources.transformFeedbackVaryings` is a `std::vector`. Indexing it with `[ndx]` calls `vector::operator[]`; it is not pointer arithmetic on the address of a single object. The objectIndex warning was a false positive caused by the container being tracked as a lifetime ('Pointer to container is created here'). The PR's new check in objectIndex skips non-pointer objects such as containers and views, which removes this false positive. ---- 41 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/webkit2gtk/webkit2gtk_2.54.3.orig.tar.xz Result: main webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/framework/opengl/gluShaderProgram.cpp:669:19: warning: The address of variable 'shaderProgramInfo.shaders' might be accessed at non-zero index. [objectIndex] webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/framework/opengl/gluShaderProgram.cpp:664:87: note: Passed to reference. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/framework/opengl/gluShaderProgram.cpp:669:27: note: Address of variable taken here. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/framework/opengl/gluShaderProgram.cpp:669:19: note: The address of variable 'shaderProgramInfo.shaders' might be accessed at non-zero index. Explanation: Line 669 is `shaderPtrs[ndx] = &shaderProgramInfo.shaders[ndx];`. `shaderPtrs` is a `std::vector`, so the `[]` calls the vector's operator[] and does no raw pointer arithmetic on the address of a single object. The objectIndex warning was a false positive: it treated the vector, whose lifetime refers to `shaderProgramInfo.shaders`, as a pointer to one object indexed at a non-zero index. The PR now skips objects whose valueType is not a pointer, so the false positive goes away. ---- 42 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/webkit2gtk/webkit2gtk_2.54.3.orig.tar.xz Result: main webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/gles2/functional/es2fShaderApiTests.cpp:95:17: warning: The address of variable 'sources.strings' might be accessed at non-zero index. [objectIndex] webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/gles2/functional/es2fShaderApiTests.cpp:90:72: note: Passed to reference. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/gles2/functional/es2fShaderApiTests.cpp:95:40: note: Pointer to container is created here. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/gles2/functional/es2fShaderApiTests.cpp:95:17: note: The address of variable 'sources.strings' might be accessed at non-zero index. Explanation: `sources.strings` is a `std::vector`, and `sources.strings[ndx]` calls `vector::operator[]`. It does not index the address of an object, so the objectIndex warning was a false positive. The PR now skips objectIndex when the indexed object is not a pointer (`valueType()->pointer == 0`), which removes this false positive. ---- 43 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/webkit2gtk/webkit2gtk_2.54.3.orig.tar.xz Result: main webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/gles3/functional/es3fShaderApiTests.cpp:110:17: warning: The address of variable 'sources.strings' might be accessed at non-zero index. [objectIndex] webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/gles3/functional/es3fShaderApiTests.cpp:105:72: note: Passed to reference. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/gles3/functional/es3fShaderApiTests.cpp:110:40: note: Pointer to container is created here. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/gles3/functional/es3fShaderApiTests.cpp:110:17: note: The address of variable 'sources.strings' might be accessed at non-zero index. Explanation: `cStrings` is a std::vector, and `cStrings[ndx]` calls the vector's operator[]. It is not pointer arithmetic on the address of `sources.strings`, so the objectIndex warning was a false positive. The PR adds a check in objectIndex that skips indexed objects whose value type is not a pointer (`pointer == 0`). That check removes this warning correctly. ---- 44 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/webkit2gtk/webkit2gtk_2.54.3.orig.tar.xz Result: main webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/gles3/functional/es3fUniformApiTests.cpp:1695:20: warning: The address of variable 'queryNames' might be accessed at non-zero index. [objectIndex] webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/gles3/functional/es3fUniformApiTests.cpp:1695:40: note: Pointer to container is created here. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/gles3/functional/es3fUniformApiTests.cpp:1695:20: note: The address of variable 'queryNames' might be accessed at non-zero index. Explanation: queryNames is a std::vector, and queryNames[i] calls vector::operator[]. It does not index a pointer to the variable 'queryNames'. The objectIndex warning came from a wrong lifetime value: the lifetime of the later queryNames[i].c_str() was linked back to the container. The new check in objectIndex skips non-pointer objects (valueType()->pointer == 0), so this false positive is removed. ---- 45 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/webkit2gtk/webkit2gtk_2.54.3.orig.tar.xz Result: main webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/glshared/glsUniformBlockCase.cpp:1506:26: warning: The address of variable 'data' might be accessed at non-zero index. [objectIndex] webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/glshared/glsUniformBlockCase.cpp:1506:39: note: Address of variable taken here. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/glshared/glsUniformBlockCase.cpp:1506:26: note: The address of variable 'data' might be accessed at non-zero index. Explanation: At line 1506, `blockPointers[blockNdx] = &data[0] + curOffset;` indexes `blockPointers`, which is a `std::map`. That indexing calls `map::operator[]` with a key; it is not pointer arithmetic on `data`. Main reported it as the address of `data` being accessed at a non-zero index, because `blockPointers` had picked up a lifetime value pointing to `data`. That was a false positive. The PR makes objectIndex skip objects whose value type is not a pointer, so this false warning is now gone. ---- 46 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/webkit2gtk/webkit2gtk_2.54.3.orig.tar.xz Result: main webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/glshared/glsUniformBlockCase.cpp:1588:28: warning: The address of variable 'glData' might be accessed at non-zero index. [objectIndex] webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/glshared/glsUniformBlockCase.cpp:1588:41: note: Address of variable taken here. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/glshared/glsUniformBlockCase.cpp:1588:28: note: The address of variable 'glData' might be accessed at non-zero index. Explanation: At line 1588, `glData` is a `vector>` and `glBlockPointers` is a `map`. The expression `glBlockPointers[blockNdx]` calls `std::map::operator[]`, not pointer arithmetic. The old objectIndex warning claimed the address of `glData` might be accessed at a non-zero index, which was a false positive. The PR adds a check that skips the indexed object when it is not a pointer, which removes this warning. ---- 47 / 47 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/w/webkit2gtk/webkit2gtk_2.54.3.orig.tar.xz Result: main webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/glshared/glsUniformBlockCase.cpp:1635:28: warning: The address of variable 'glData' might be accessed at non-zero index. [objectIndex] webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/glshared/glsUniformBlockCase.cpp:1635:41: note: Address of variable taken here. webkitgtk-2.54.3/Source/ThirdParty/ANGLE/third_party/VK-GL-CTS/src/modules/glshared/glsUniformBlockCase.cpp:1635:28: note: The address of variable 'glData' might be accessed at non-zero index. Explanation: At line 1635 `glData` is a `std::vector` and `glData[glBlockOffsets[blockNdx]]` calls `vector::operator[]` on a container object, not pointer arithmetic on the address of a scalar variable. The objectIndex warning claiming that the 'address of variable glData' is indexed at a non-zero index was a false positive. The new check in objectIndex skips non-pointer objects (`valueType()->pointer == 0`), which removes it correctly.