File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
cpp/cert/test/rules/CTR55-CPP Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 44| test.cpp:22:18:22:18 | i | Increment of iterator may overflow since its bounds are not checked. |
55| test.cpp:28:31:28:31 | i | Increment of iterator may overflow since its bounds are not checked. |
66| test.cpp:41:5:41:8 | end2 | Increment of iterator may overflow since its bounds are not checked. |
7- | test.cpp:50 :42:50 :42 | i | Increment of iterator may overflow since its bounds are not checked. |
7+ | test.cpp:53 :42:53 :42 | i | Increment of iterator may overflow since its bounds are not checked. |
Original file line number Diff line number Diff line change @@ -38,8 +38,11 @@ void test_fp_reported_in_374(std::vector<int> &v) {
3838
3939 {
4040 auto end2 = v.end ();
41- end2++; // NON_COMPLIANT
42- for (auto i = v.begin (); i != end2; ++i) { // NON_COMPLIANT[FALSE_NEGATIVE]
41+ end2++; // NON_COMPLIANT
42+ for (auto i = v.begin (); i != end2;
43+ ++i) { // NON_COMPLIANT[FALSE_NEGATIVE] - case of invalidations to
44+ // check before use expected to be less frequent, can model in
45+ // future if need be
4346 }
4447 }
4548}
You can’t perform that action at this time.
0 commit comments