Skip to content

Commit

Permalink
Remove no longer needed false positive markers
Browse files Browse the repository at this point in the history
  • Loading branch information
lcartey committed Dec 5, 2024
1 parent d7be5cc commit 0aa1f5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/common/test/rules/validcontainerelementaccess/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ void f8(const int *ar) {
void f9(const std::string &s, std::string &str) {
std::string::iterator loc = str.begin();
for (auto i = s.begin(), e = s.end(); i != e; ++i, ++loc) { // NON_COMPLIANT
str.insert(loc, 'c'); // NON_COMPLIANT[FALSE POSITIVE for str]
str.insert(loc, 'c'); // NON_COMPLIANT
}
}

void f10(const std::string &s, std::string &str) {
std::string::iterator loc = str.begin();
for (auto i = s.begin(), e = s.end(); i != e; ++i, ++loc) { // COMPLIANT
loc = str.insert(loc, 'c'); // COMPLIANT[FALSE POSITIVE]
loc = str.insert(loc, 'c'); // COMPLIANT
}
}

Expand Down

0 comments on commit 0aa1f5f

Please sign in to comment.