AI review of 2026-11-24_00-25-56-2b2c0a14d391-results.txt PR: #9060 https://github.com/cppcheck-opensource/cppcheck/pull/9060 Tested: 2b2c0a14d391fb0c6351128abad6a36c07b5ee89 Merge base: e1b5791564c662c7dacbc62835f6abe5431aa00b Reviewed: 2026-11-25 13:30:30 UTC Model: claude-opus-5-5 (effort high) Results: 50 reviewed of 60 in the report (random sample) Verdicts: 50 improvement Tokens: 307975 input, 2688581 cache read, 54869 cache write, 10597 output The verdicts are written by AI and can be wrong. ---- 1 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1016:18: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1016:18: note: Added to container 's0'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1017:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>`, so `verts[i]` calls `operator[]` on a container object. It is not pointer arithmetic on the address of `objs`. The pointers `&objs[k]` point into the `objs` vector, so an index into them would be fine anyway. The warning was a false positive. The new check in objectIndex skips objects whose valueType has pointer == 0, which removes it. ---- 2 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1016:42: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1016:42: note: Added to container 's0'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1017:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>`. `verts[i]` calls the container's operator[] on a vector object, so it is not pointer arithmetic on the address of `objs`. The vector only stores pointers to elements of the `objs` vector, so the objectIndex warning was a false positive. The new check in objectIndex skips indexed objects whose valueType is not a pointer, which removes it. ---- 3 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1019:42: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1019:42: note: Added to container 's1'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1020:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: At line 1073 the code indexes `verts[i]`, where `verts` is a `std::vector>`. This calls the vector's `operator[]`; it is not pointer arithmetic on the address of `objs`. The elements are pointers to elements of the vector `objs` (`&objs[1]` etc.), and `objs` is never indexed out of bounds, 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 correctly. ---- 4 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1019:66: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1019:66: note: Added to container 's1'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1020:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>`. `verts[i]` is a container index that calls `operator[]` and returns an element of the vector. It is not pointer arithmetic on the address of `objs`. Indexing it at a non-zero index is fine. The objectIndex warning was a false positive caused by lifetime values that flowed through the container. The new check in objectIndex skips non-pointer objects (`obj->valueType()->pointer == 0`), which removes this false positive. ---- 5 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:42: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:42: note: Added to container 's2'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1023:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>` and `verts[i]` calls `std::vector::operator[]`. It does not index the address of `objs`. The pointers stored in the inner vectors point to elements of the `std::vector` `objs`, not to a scalar variable. The objectIndex warning was a false positive. The PR now skips objectIndex when the indexed object is not a pointer, which removes it correctly. ---- 6 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:66: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:66: note: Added to container 's2'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1023:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: At line 1073 the code indexes `verts[i]`, which is a std::vector of vectors. `objs` is a std::vector, and `&objs[k]` points to an element of it. The objectIndex warning wrongly treated this as indexing the address of the variable 'objs' at a non-zero index. That is a false positive: indexing a vector calls operator[], and `verts[i]` is a valid element access. The PR's objectIndex change skips objects whose valueType is not a pointer, and the lifetime kind changes (Object instead of Address for container elements) also remove this false positive. ---- 7 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:90: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:90: note: Added to container 's2'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1023:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:68: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>`, and `verts[i]` indexes the container through operator[]. No raw pointer to the variable `objs` is indexed here. The pointers stored in s2 point to elements `&objs[k]` of a `std::vector`, so there is no out-of-bounds pointer arithmetic on the address of a single object. The objectIndex warning was a false positive. The PR's new check in objectIndex skips non-pointer objects (`valueType()->pointer == 0`), which correctly removes it. ---- 8 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1016:18: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1016:18: note: Added to container 's0'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1017:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>`. It holds pointers to elements of the vector `objs`, not the address of a scalar variable. `verts[i]` calls `std::vector::operator[]`, so indexing it at a non-zero index is fine. The warning claiming that the address of `objs` is accessed at a non-zero index was a false positive. The PR's new guard in objectIndex skips objects whose value type is not a pointer, such as a container, and that removes this false positive. ---- 9 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1016:42: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1016:42: note: Added to container 's0'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1017:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>`, and `objs` is a `std::vector`. The expression `verts[i]` calls `operator[]` on a container, so it is not pointer arithmetic on the address of `objs`. Indexing `verts` at non-zero `i` is valid, which makes the objectIndex warning a false positive. The PR's new check in objectIndex skips non-pointer objects, and the reworked lifetime kinds also apply here, so this false positive is removed. ---- 10 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1019:18: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1019:18: note: Added to container 's1'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1020:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>`. `verts[i]` calls the container's operator[] and does not index the raw address of `objs`. The lifetime values come from `&objs[k]` being pushed into `s1` and then into `verts`. The address points into the elements of the `objs` vector, so indexing `verts` is not pointer arithmetic on the address of a variable. The PR now skips objectIndex when the indexed object is not a pointer (valueType pointer == 0), and it also makes lifetimes of elements interior. The removed warning was a false positive. ---- 11 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1019:42: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1019:42: note: Added to container 's1'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1020:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>`, so `verts[i]` calls the vector's `operator[]`. It is not pointer arithmetic on the address of `objs[1]`. The pointers in `verts` point to elements of `objs`, which is also a vector of 10 elements. The objectIndex warning, which claims the address of a single variable is accessed at a non-zero index, is a false positive. The PR's new check skips `objectIndex` when the indexed object is not a pointer (`valueType()->pointer == 0`, i.e. a container or class whose `[]` is `operator[]`), and that removes this false positive. ---- 12 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1019:66: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1019:66: note: Added to container 's1'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1020:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: The removed warning points at `verts[i].begin()` and `verts[i].end()` on line 1073. `verts` is a `std::vector>`, so `verts[i]` is a call to the vector's `operator[]` on a container object, not pointer arithmetic on the address of `objs`. The pointers stored in it are `&objs[k]`, which are element addresses of a `std::vector`, not the address of a scalar variable. The objectIndex warning was a false positive. The PR's change in objectIndex skips objects whose type is not a pointer (`valueType()->pointer == 0`), and that removes it. ---- 13 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:18: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:18: note: Added to container 's2'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1023:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>` and `verts[i]` calls `std::vector::operator[]`. It does not index the address of `objs`. Main reported objectIndex because the lifetime of `&objs[0]` was propagated into the container `verts`, and indexing a container with operator[] was treated as indexing a pointer to the variable. The PR skips objectIndex when the indexed object is not a pointer (`valueType()->pointer == 0`), which removes this false positive. ---- 14 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:42: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:42: note: Added to container 's2'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1023:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `objs` is a `std::vector`, and `&objs[i]` points to the vector's elements, not to the variable `objs`. `verts[i]` indexes a `std::vector`, which calls `operator[]` and is not pointer arithmetic on the address of a variable. The objectIndex warning was a false positive. The new check in objectIndex skips indexed objects whose type is not a pointer (`verts` has pointer == 0), so this false positive is removed. ---- 15 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:66: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:66: note: Added to container 's2'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1023:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: At line 1073 the expression `verts[i]` indexes a `std::vector>`. That calls the container's operator[], not pointer arithmetic on the address of `objs`. The `&objs[k]` pointers stored in `verts` point to vector elements, so indexing into `verts` never accesses `objs` at a non-zero offset. The objectIndex warning was a false positive. The PR makes objectIndex skip indexed objects whose type is not a pointer (here a container), which removes it. ---- 16 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:90: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1022:90: note: Added to container 's2'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1023:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>`. `verts[i]` calls `std::vector::operator[]`, not raw pointer indexing of an object's address. The pointers to elements of `objs` stored in the inner vectors do not make `verts[i]` an out-of-bounds access of `objs`. The objectIndex warning was a false positive. The PR now skips objectIndex when the indexed object is not a pointer (its valueType has pointer == 0), and that removes the warning. ---- 17 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1025:18: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1025:18: note: Added to container 's3'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1026:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1073:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>`. It holds pointers to elements of the vector `objs` (`&objs[0]` and so on). `verts[i]` is container indexing, which calls `operator[]` on a vector. It does not index a raw pointer to a single variable. The objectIndex warning claiming that the address of `objs` might be accessed at a non-zero index was therefore a false positive. The PR's new check skips objectIndex when the indexed object is not a pointer (`valueType()->pointer == 0`), which removes it. ---- 18 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:68: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1106:18: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1106:18: note: Added to container 's1'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1107:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:68: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: The removed objectIndex warning was a false positive. At line 1140, `verts[i]` indexes `verts`, which is a std::vector of vectors of pointers. That calls operator[] on a container object; it does not index the raw address of `objs`. The lifetime tracking had linked `verts` to the addresses `&objs[k]` pushed into `s1`, so the check wrongly treated `verts[i]` as pointer arithmetic on the address of `objs`. The PR now skips objectIndex when the indexed object is not a pointer, which is exactly this case. ---- 19 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:68: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1106:42: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1106:42: note: Added to container 's1'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1107:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:68: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a std::vector of std::vector, and `verts[i]` is indexed with the loop variable `i`. The pointers stored in `verts[i]` point to elements of the `objs` array, but indexing `verts` calls the container's operator[]. It does not do pointer arithmetic on the address of `objs`. 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 warning correctly. ---- 20 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:68: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1109:18: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1109:18: note: Added to container 's2'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1110:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:68: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: At line 1140, `verts` is a `std::vector>` and `verts[i]` calls `vector::operator[]`. It does not index the address of `objs`. `objs` is presumably an array of objects, so `&objs[2]` already points into an array. In main the lifetime value from `push_back(&objs[...])` propagated into the container, and objectIndex then wrongly treated indexing `verts` as indexing the address of a single variable. The PR makes objectIndex skip non-pointer objects (`valueType()->pointer == 0`), so this false positive is removed. ---- 21 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:68: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1109:42: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1109:42: note: Added to container 's2'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1110:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:68: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: At line 1140, `verts[i]` indexes a `std::vector>`. This calls the container's `operator[]` to pick one of the inner vectors. It does not do pointer arithmetic on `&objs[k]`. `verts` merely holds vectors that store addresses of `objs` elements, so the claim that the address of `objs` is accessed at a non-zero index is a false positive. The PR's new check in `objectIndex` skips indexed objects whose value type is not a pointer. That removes this bogus warning. ---- 22 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:68: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1109:66: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1109:66: note: Added to container 's2'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1110:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:68: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: At line 1140 the code indexes `verts[i]`. `verts` is a `std::vector>`, so the index calls `vector::operator[]` and is an ordinary container access. It is not pointer arithmetic on the address of `objs`. The objectIndex warning came from lifetime values propagated into the container, which made it look like `&objs[k]` was being indexed. The new check in objectIndex skips objects whose value type is not a pointer, so this false positive is removed. ---- 23 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1103:18: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1103:18: note: Added to container 's0'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1104:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: At line 1140, `verts[i]` indexes a `std::vector>`. That calls `operator[]` on a container. It is not pointer arithmetic on the address of `objs[0]`. The lifetime values come from the pointers that were pushed into `s0` and then into `verts`, so the objectIndex warning was a false positive. The PR now skips `objectIndex` when the indexed object is not a pointer (`valueType()->pointer == 0`). That removes this bogus warning. ---- 24 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1103:42: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1103:42: note: Added to container 's0'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1104:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: At line 1140, `verts[i]` indexes a `std::vector>`. That is a container's operator[], not pointer arithmetic on the address of `objs`. The lifetime value only says that `verts` stores pointers into `objs`. Reporting that the address of `objs` is accessed at a non-zero index is a false positive. The PR's new check in objectIndex skips objects whose valueType has pointer == 0, such as containers, so this false positive is removed. ---- 25 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1106:18: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1106:18: note: Added to container 's1'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1107:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: At line 1140, verts[i] indexes a std::vector>. That calls the container's operator[], which is not pointer arithmetic on the address of 'objs'. The vector holds pointers to elements of objs (&objs[0] etc., where objs is presumably an array or container). The objectIndex warning about accessing the address of 'objs' at a non-zero index is a false positive. The PR adds a check that skips objectIndex when the indexed object is not a pointer (valueType()->pointer == 0), so this false positive is removed. ---- 26 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1106:66: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1106:66: note: Added to container 's1'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1107:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: At line 1140, `verts[i]` indexes a `std::vector>`. That calls the container's `operator[]` with a loop index bounded by `verts.size()`. It does not index the address of an element of `objs` at a non-zero offset. The pointers `&objs[k]` are only stored as elements inside the nested vectors, so the objectIndex warning was a false positive. The PR adds a check that skips objectIndex when the indexed object is not a pointer (`valueType()->pointer == 0`). That check removes this spurious warning. ---- 27 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1109:18: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1109:18: note: Added to container 's2'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1110:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: `verts` is a `std::vector>`. So `verts[i]` is a container element indexed through `operator[]`; it is not a raw pointer to `objs` being indexed. The warning claimed that the address of `objs` is accessed at a non-zero index, which is a false positive. The container lifetime tracking had carried the address of `objs` into `verts`. The PR makes objectIndex skip objects whose type is not a pointer (`pointer == 0`), which removes this false warning. ---- 28 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/cctbx/cctbx_2026.9+ds2+~3.30.1+ds1.orig.tar.xz Result: main cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:92: warning: The address of variable 'objs' might be accessed at non-zero index. [objectIndex] cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1109:90: note: Address of variable taken here. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1109:90: note: Added to container 's2'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1110:21: note: Added to container 'verts'. cctbx-cctbx_project-4b6acc4/mmtbx/reduce/Optimizers.cpp:1140:92: note: The address of variable 'objs' might be accessed at non-zero index. Explanation: At line 1140, `verts[i]` indexes `verts`, a `std::vector>`. The vectors stored in it hold pointers into `objs`, but indexing a vector object calls `operator[]` and selects an element of a real container. It does not do pointer arithmetic on `&objs[k]`. So the objectIndex warning ('address of variable objs 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 false positive. ---- 29 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/ceres-solver/ceres-solver_2.2.0+dfsg.orig.tar.xz Result: main ceres-solver-2.2.0/internal/ceres/dynamic_autodiff_cost_function_test.cc:117:19: error: The address of variable 'param_block_0' is accessed at non-zero index. [objectIndex] ceres-solver-2.2.0/internal/ceres/dynamic_autodiff_cost_function_test.cc:116:25: note: Address of variable taken here. ceres-solver-2.2.0/internal/ceres/dynamic_autodiff_cost_function_test.cc:117:19: note: The address of variable 'param_block_0' is accessed at non-zero index. Explanation: Line 117 is `parameter_blocks[1] = ¶m_block_1[0];`, where `parameter_blocks` is a std::vector. Indexing it at 1 calls vector::operator[], which is valid for a vector of size 2. The warning is also confused about the variable: it says `param_block_0` because the vector holds `¶m_block_0[0]` in element 0. That is not pointer arithmetic on the address of a variable. The new check in objectIndex skips objects whose value type is not a pointer (here the container `parameter_blocks`), so this false positive goes away. ---- 30 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/ceres-solver/ceres-solver_2.2.0+dfsg.orig.tar.xz Result: main ceres-solver-2.2.0/internal/ceres/dynamic_autodiff_cost_function_test.cc:183:19: error: The address of variable 'param_block_0' is accessed at non-zero index. [objectIndex] ceres-solver-2.2.0/internal/ceres/dynamic_autodiff_cost_function_test.cc:182:25: note: Address of variable taken here. ceres-solver-2.2.0/internal/ceres/dynamic_autodiff_cost_function_test.cc:183:19: note: The address of variable 'param_block_0' is accessed at non-zero index. Explanation: `parameter_blocks` is a `std::vector`. Indexing it with `[1]` calls `operator[]` on the vector object; it is not pointer arithmetic on `¶m_block_0[0]`. The old warning was a false positive. It came from treating the vector's lifetime value (the address of `param_block_0` element stored in it) as if the object itself were that address. The PR now skips objectIndex when the indexed object is not a pointer (pointer == 0), so this false positive is removed. ---- 31 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/ceres-solver/ceres-solver_2.2.0+dfsg.orig.tar.xz Result: main ceres-solver-2.2.0/internal/ceres/dynamic_autodiff_cost_function_test.cc:233:19: error: The address of variable 'param_block_0' is accessed at non-zero index. [objectIndex] ceres-solver-2.2.0/internal/ceres/dynamic_autodiff_cost_function_test.cc:232:25: note: Address of variable taken here. ceres-solver-2.2.0/internal/ceres/dynamic_autodiff_cost_function_test.cc:233:19: note: The address of variable 'param_block_0' is accessed at non-zero index. Explanation: Line 233 writes `parameter_blocks[1] = ...`, where `parameter_blocks` is a std::vector. Indexing it calls operator[] and is a valid access. On line 232, `parameter_blocks[0] = ¶m_block_0[0]` stores a pointer to an element of a vector, which is fine. Main confused the container with a raw address of `param_block_0` and reported objectIndex. The new check skips objects whose valueType is not a pointer, so this false positive is gone. ---- 32 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/ceres-solver/ceres-solver_2.2.0+dfsg.orig.tar.xz Result: main ceres-solver-2.2.0/internal/ceres/dynamic_autodiff_cost_function_test.cc:88:19: error: The address of variable 'param_block_0' is accessed at non-zero index. [objectIndex] ceres-solver-2.2.0/internal/ceres/dynamic_autodiff_cost_function_test.cc:87:25: note: Address of variable taken here. ceres-solver-2.2.0/internal/ceres/dynamic_autodiff_cost_function_test.cc:88:19: note: The address of variable 'param_block_0' is accessed at non-zero index. Explanation: `parameter_blocks` is a `std::vector`. Line 87 stores `¶m_block_0[0]` (a pointer into another vector) in its element 0, and line 88 writes `parameter_blocks[1]`. That is `std::vector::operator[]` on a container with 2 elements, not pointer arithmetic on the address of `param_block_0`. The objectIndex warning was a false positive caused by lifetime values propagating to the container. The PR now skips objectIndex when the indexed object is not a pointer (`valueType()->pointer == 0`), so this false positive is removed. ---- 33 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/ceres-solver/ceres-solver_2.2.0+dfsg.orig.tar.xz Result: main ceres-solver-2.2.0/internal/ceres/dynamic_numeric_diff_cost_function_test.cc:117:19: error: The address of variable 'param_block_0' is accessed at non-zero index. [objectIndex] ceres-solver-2.2.0/internal/ceres/dynamic_numeric_diff_cost_function_test.cc:116:25: note: Address of variable taken here. ceres-solver-2.2.0/internal/ceres/dynamic_numeric_diff_cost_function_test.cc:117:19: note: The address of variable 'param_block_0' is accessed at non-zero index. Explanation: The removed warning was a false positive. `parameter_blocks` is a `std::vector`, so `parameter_blocks[1]` calls the container's operator[] and does not index the address of `param_block_0`. Assigning `parameter_blocks[0] = ¶m_block_0[0]` gives the vector a lifetime value, and main's objectIndex check then treated the index on line 117 as pointer arithmetic on the address of `param_block_0`. The PR makes objectIndex skip objects whose value type is not a pointer (`pointer == 0`), which removes this false positive. ---- 34 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/ceres-solver/ceres-solver_2.2.0+dfsg.orig.tar.xz Result: main ceres-solver-2.2.0/internal/ceres/dynamic_numeric_diff_cost_function_test.cc:184:19: error: The address of variable 'param_block_0' is accessed at non-zero index. [objectIndex] ceres-solver-2.2.0/internal/ceres/dynamic_numeric_diff_cost_function_test.cc:183:25: note: Address of variable taken here. ceres-solver-2.2.0/internal/ceres/dynamic_numeric_diff_cost_function_test.cc:184:19: note: The address of variable 'param_block_0' is accessed at non-zero index. Explanation: `parameter_blocks` is a std::vector. Line 184 writes `parameter_blocks[1] = ¶m_block_1[0]`, which calls std::vector::operator[]. It does not index the address of `param_block_0`. The old warning was a false positive: the lifetime of `parameter_blocks` came from the earlier assignment, and indexing the vector object was treated like pointer arithmetic. The PR now skips objectIndex when the indexed object is not a pointer (valueType()->pointer == 0). That removes this false positive. ---- 35 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/ceres-solver/ceres-solver_2.2.0+dfsg.orig.tar.xz Result: main ceres-solver-2.2.0/internal/ceres/dynamic_numeric_diff_cost_function_test.cc:234:19: error: The address of variable 'param_block_0' is accessed at non-zero index. [objectIndex] ceres-solver-2.2.0/internal/ceres/dynamic_numeric_diff_cost_function_test.cc:233:25: note: Address of variable taken here. ceres-solver-2.2.0/internal/ceres/dynamic_numeric_diff_cost_function_test.cc:234:19: note: The address of variable 'param_block_0' is accessed at non-zero index. Explanation: Line 234 is `parameter_blocks[1] = ¶m_block_1[0];`. `parameter_blocks` is a std::vector, so indexing it calls operator[] on the vector. It does not index past the address of `param_block_0`. Main confused the element stored by the previous assignment (`¶m_block_0[0]`) with the vector object and reported objectIndex. That is a false positive. The PR makes objectIndex skip non-pointer objects such as containers, so the false positive is gone. ---- 36 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/c/ceres-solver/ceres-solver_2.2.0+dfsg.orig.tar.xz Result: main ceres-solver-2.2.0/internal/ceres/dynamic_numeric_diff_cost_function_test.cc:88:19: error: The address of variable 'param_block_0' is accessed at non-zero index. [objectIndex] ceres-solver-2.2.0/internal/ceres/dynamic_numeric_diff_cost_function_test.cc:87:25: note: Address of variable taken here. ceres-solver-2.2.0/internal/ceres/dynamic_numeric_diff_cost_function_test.cc:88:19: note: The address of variable 'param_block_0' is accessed at non-zero index. Explanation: `parameter_blocks` is a std::vector. Line 88 calls its operator[] with index 1. Line 87 stores ¶m_block_0[0] into element 0, which made Cppcheck think `parameter_blocks` points to `param_block_0`. The objectIndex warning was a false positive: indexing a container is not pointer arithmetic on the address of `param_block_0`. The PR's new check in objectIndex skips objects whose valueType is not a pointer, which removes this false positive. ---- 37 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/d/dynare/dynare_7.2.orig.tar.xz Result: main dynare-7.2/mex/sources/k_order_perturbation/k_order_perturbation.cc:276:25: warning: The address of variable 'g_fieldnames' might be accessed at non-zero index. [objectIndex] dynare-7.2/mex/sources/k_order_perturbation/k_order_perturbation.cc:276:43: note: Pointer to container is created here. dynare-7.2/mex/sources/k_order_perturbation/k_order_perturbation.cc:276:25: note: The address of variable 'g_fieldnames' might be accessed at non-zero index. Explanation: `g_fieldnames_c` is a `std::vector`. Indexing it calls the container's `operator[]`, which is always valid here because the vector has `kOrder+1` elements. The old objectIndex warning wrongly treated the vector as the address of `g_fieldnames` ("Pointer to container is created here" at `.c_str()`), so it was a false positive. The PR skips objectIndex when the indexed object is not a pointer (`valueType()->pointer == 0`), which removes this false positive. ---- 38 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/d/dynare/dynare_7.2.orig.tar.xz Result: main dynare-7.2/mex/sources/k_order_welfare/k_order_welfare.cc:348:21: warning: The address of variable 'W_fieldnames' might be accessed at non-zero index. [objectIndex] dynare-7.2/mex/sources/k_order_welfare/k_order_welfare.cc:348:39: note: Pointer to container is created here. dynare-7.2/mex/sources/k_order_welfare/k_order_welfare.cc:348:21: note: The address of variable 'W_fieldnames' might be accessed at non-zero index. Explanation: `W_fieldnames_c` is a `std::vector`, so `W_fieldnames_c[i]` calls the container's `operator[]` with a valid index from 0 to kOrder. It is not pointer arithmetic on the address of `W_fieldnames`. The old warning came from treating the container as an object address and was a false positive. The new check in objectIndex skips objects whose valueType is not a pointer, which removes this warning correctly. ---- 39 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/e/eclib/eclib_20260707.orig.tar.gz Result: main eclib-20260707/libsrc/matrix.cc:982:32: warning: The address of variable 'M.entries.begin' might be accessed at non-zero index. [objectIndex] eclib-20260707/libsrc/matrix.cc:968:39: note: Passed to reference. eclib-20260707/libsrc/matrix.cc:978:16: note: Iterator to container is created here. eclib-20260707/libsrc/matrix.cc:982:32: note: The address of variable 'M.entries.begin' might be accessed at non-zero index. Explanation: `a` is a `vector::const_iterator` taken from `M.entries.begin()` and used to walk the matrix rows. `a[j]` is ordinary iterator indexing into the container's elements, so it is valid and not an access to the address of a single object at a non-zero index. The objectIndex warning was a false positive. The PR now skips objectIndex when the indexed object is not a pointer (`valueType()->pointer == 0`), as is the case for an iterator, and that removes this false positive. ---- 40 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/e/eclib/eclib_20260707.orig.tar.gz Result: main eclib-20260707/libsrc/mwprocs.cc:1028:18: warning: The address of variable 'squares' might be accessed at non-zero index. [objectIndex] eclib-20260707/libsrc/mwprocs.cc:1024:26: note: Iterator to container is created here. eclib-20260707/libsrc/mwprocs.cc:1028:18: note: The address of variable 'squares' might be accessed at non-zero index. Explanation: `sqs` is an iterator from `squares[index].begin()`, and `sqs[f]` indexes the container's elements through it. That is valid, not indexing past a single object, so the objectIndex warning was a false positive. The PR makes objectIndex skip index expressions on non-pointer objects such as iterators and views, which removes this false positive. ---- 41 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/e/eclib/eclib_20260707.orig.tar.gz Result: main eclib-20260707/libsrc/mwprocs.cc:881:30: warning: The address of variable 'squares' might be accessed at non-zero index. [objectIndex] eclib-20260707/libsrc/mwprocs.cc:870:31: note: Iterator to container is created here. eclib-20260707/libsrc/mwprocs.cc:881:30: note: The address of variable 'squares' might be accessed at non-zero index. Explanation: `sqs` is an iterator from `squares[index].begin()`. Indexing it with `sqs[f]` is ordinary iterator indexing into the container's elements, which is valid for f < aux. Main wrongly treated the iterator as the address of the single object 'squares' and warned about access at a non-zero index. The PR changes view and iterator lifetimes to kind Object and skips objectIndex when the indexed object is not a pointer, so this false positive is gone. ---- 42 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/e/eclib/eclib_20260707.orig.tar.gz Result: main eclib-20260707/libsrc/smatrix.cc:261:4: warning: The address of variable 'ans.entries.begin' might be accessed at non-zero index. [objectIndex] eclib-20260707/libsrc/smatrix.cc:254:16: note: Iterator to container is created here. eclib-20260707/libsrc/smatrix.cc:261:4: note: The address of variable 'ans.entries.begin' might be accessed at non-zero index. Explanation: `mi` is an iterator from `ans.entries.begin()`, presumably a std::vector iterator. Indexing it calls the iterator's operator[], which refers into the container's buffer. It does not index the address of a single object, so 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 it. ---- 43 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/l/lemonade/lemonade_2026.46.2.orig.tar.gz Result: main lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:441:59: warning: The address of variable 'downloaded_models' might be accessed at non-zero index. [objectIndex] lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:424:30: note: Assigned to reference. lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:426:53: note: Address of variable taken here. lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:426:53: note: Added to container 'downloaded_llm_models'. lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:425:53: note: Assuming condition is true lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:424:36: note: Assuming condition is true lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:430:17: note: Assuming condition is true lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:441:59: note: The address of variable 'downloaded_models' might be accessed at non-zero index. Explanation: `downloaded_llm_models` is a `std::vector` that holds pointers to elements of `downloaded_models`. Indexing it calls `vector::operator[]`; it does not do pointer arithmetic on the address of `downloaded_models`. The removed objectIndex warning was a false positive. The PR now skips objectIndex when the indexed object is not a pointer (`valueType()->pointer == 0`), which is exactly this case. ---- 44 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/l/lemonade/lemonade_2026.46.2.orig.tar.gz Result: main lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:558:44: warning: The address of variable 'models' might be accessed at non-zero index. [objectIndex] lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:544:22: note: Assigned to reference. lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:548:34: note: Address of variable taken here. lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:548:34: note: Added to container 'display_models'. lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:545:23: note: Assuming condition is false lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:544:28: note: Assuming condition is true lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:551:29: note: Assuming condition is false lemonade-sdk-lemonade-50ffee1/src/cpp/cli/model_selection.cpp:558:44: note: The address of variable 'models' might be accessed at non-zero index. Explanation: `display_models` is a `std::vector`. Each element is the address of an element of `models`. `display_models[i]` calls the vector's operator[] and indexes the vector itself, not a pointer to a single object, so there is no out-of-bounds access of `models`. The objectIndex warning was a false positive. The PR's new check in objectIndex skips non-pointer indexed objects such as containers and views, which removes it. ---- 45 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/pcl/pcl_1.15.1+dfsg.orig.tar.xz Result: main pcl-pcl-1.15.1/io/src/pcd_io.cpp:1429:12: warning: The address of variable 'only_valid_data' might be accessed at non-zero index. [objectIndex] pcl-pcl-1.15.1/io/src/pcd_io.cpp:1429:18: note: Address of variable taken here. pcl-pcl-1.15.1/io/src/pcd_io.cpp:1429:12: note: The address of variable 'only_valid_data' might be accessed at non-zero index. Explanation: Line 1429 is `pters[i] = &only_valid_data[toff];`. Column 12 is the `[` in `pters[i]`, where `pters` is a `std::vector`. Indexing it calls `vector::operator[]` and never indexes the address of `only_valid_data`. `only_valid_data` is a `std::vector`, and `&only_valid_data[toff]` takes the address of an element, not the vector object, so indexing past it is fine either way. The objectIndex warning was a false positive. The PR now skips objects with non-pointer value types, such as containers, in objectIndex, so this false positive is removed. ---- 46 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/pcl/pcl_1.15.1+dfsg.orig.tar.xz Result: main pcl-pcl-1.15.1/io/src/pcd_io.cpp:619:12: warning: The address of variable 'buf' might be accessed at non-zero index. [objectIndex] pcl-pcl-1.15.1/io/src/pcd_io.cpp:619:18: note: Address of variable taken here. pcl-pcl-1.15.1/io/src/pcd_io.cpp:619:12: note: The address of variable 'buf' might be accessed at non-zero index. Explanation: At line 619, `buf` is a std::vector, and `&buf[toff]` takes the address of an element returned by vector::operator[]. Main reported that the address of variable 'buf' might be accessed at a non-zero index. That is a false positive: indexing an object such as a vector calls operator[] and is valid at any in-range index. The PR adds a check in objectIndex that skips objects whose value type is not a pointer, so the false positive is removed. ---- 47 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/p/perfetto/perfetto_59.1.orig.tar.gz Result: main perfetto-59.1/src/trace_processor/plugins/interval_intersect/interval_intersect.cc:324:19: warning: The address of variable 'tables' might be accessed at non-zero index. [objectIndex] perfetto-59.1/src/trace_processor/plugins/interval_intersect/interval_intersect.cc:324:25: note: Address of variable taken here. perfetto-59.1/src/trace_processor/plugins/interval_intersect/interval_intersect.cc:313:22: note: Assuming condition is false perfetto-59.1/src/trace_processor/plugins/interval_intersect/interval_intersect.cc:324:19: note: The address of variable 'tables' might be accessed at non-zero index. Explanation: `tables` is a `std::vector`, and `tables[i]` calls the vector's `operator[]`. The objectIndex warning said that 'the address of variable tables' is indexed at a non-zero index. That is wrong, because indexing a vector object is not pointer arithmetic on the address of a variable. The PR adds a check in objectIndex that skips the warning when the indexed object is not a pointer (`valueType()->pointer == 0`). This removes the false positive. ---- 48 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/t/tantan/tantan_52.orig.tar.xz Result: main tantan-52/src/LambdaCalculator.cc:114:12: warning: The address of variable 'tmpVals' might be accessed at non-zero index. [objectIndex] tantan-52/src/LambdaCalculator.cc:114:18: note: Address of variable taken here. tantan-52/src/LambdaCalculator.cc:114:12: note: The address of variable 'tmpVals' might be accessed at non-zero index. Explanation: Line 114 indexes `tmpPtrs[i]`, where `tmpPtrs` is a `std::vector`. The value stored is `&tmpVals[i * alpha_size]`, a pointer to an element of a vector. Indexing a vector calls `operator[]` on a properly sized container, so it is not an out-of-bounds access of the address of a scalar variable. The objectIndex warning was a false positive, likely caused by the changed lifetime tracking for container contents. The new check in objectIndex skips objects with non-pointer value types such as containers, which removes this false positive. ---- 49 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/t/tantan/tantan_52.orig.tar.xz Result: main tantan-52/src/LambdaCalculator.cc:249:12: warning: The address of variable 'matVals' might be accessed at non-zero index. [objectIndex] tantan-52/src/LambdaCalculator.cc:249:18: note: Address of variable taken here. tantan-52/src/LambdaCalculator.cc:249:12: note: The address of variable 'matVals' might be accessed at non-zero index. Explanation: At line 249, `matPtrs` is a `std::vector`. Indexing it with `matPtrs[i]` calls `std::vector::operator[]` on the vector object; it does not do pointer arithmetic on the address of `matVals`. `matPtrs[i] = &matVals[i * alphSize]` just stores a pointer to an element of a properly sized vector. The objectIndex warning was a false positive. It most likely came from the lifetime of `&matVals[...]` being linked to the vector. The PR's new check in objectIndex skips non-pointer objects such as containers, which removes this warning. ---- 50 / 50 ---- Verdict: IMPROVEMENT (high confidence) Package: https://ftp.debian.org/debian/pool/main/v/vkbasalt/vkbasalt_0.3.2.10.orig.tar.gz Result: main vkBasalt-0.3.2.10/src/descriptor_set.cpp:173:36: warning: The address of variable 'imageInfos' might be accessed at non-zero index. [objectIndex] vkBasalt-0.3.2.10/src/descriptor_set.cpp:172:53: note: Address of variable taken here. vkBasalt-0.3.2.10/src/descriptor_set.cpp:173:36: note: The address of variable 'imageInfos' might be accessed at non-zero index. Explanation: The removed objectIndex warning claims that the address of 'imageInfos' is accessed at a non-zero index. In the code, imageInfos and writeDescriptorSets are both std::vector objects. writeDescriptorSets[j] calls the vector's operator[], not pointer arithmetic on the address of imageInfos. The pointer stored in a member (pImageInfo = &imageInfos[j]) does not make writeDescriptorSets point to imageInfos. The warning was a false positive. The PR now skips objectIndex when the indexed object is not a pointer (valueType()->pointer == 0), which removes it.