Cppcheck errors fixed and suppressed (#319)

* supress knownConditionTrueFalse

* cppcheck suppress redundantInitialization

* cppcheck solve stlcstrStream

* cppcheck suppress useStlAlgorithm

* cppcheck-suppress derefInvalidIteratorRedundantCheck

* cppcheck solvwe constParameterReference

* const parameter reference cppcheck

* removed wrong fix

* cppcheck-suppress memsetClassFloat

* cppcheck fix memsetClassFloat

* cppcheck fix unsignedLessThanZero

* supressing all errors on simde gitmodule

* fix typo (unsignedLessThanZero)

* fix cppcheck suppress simde gitmodule

* cppcheck-suppress unsignedLessThanZero

---------

Co-authored-by: gtsoul-tech <gtsoulkanakis@gmail.com>
This commit is contained in:
gtsoul-tech
2024-11-12 10:01:11 +02:00
committed by GitHub
parent 5145b6d2ab
commit 9a3268b047
12 changed files with 33 additions and 24 deletions

View File

@@ -512,6 +512,7 @@ set<NFAVertex> findZombies(const NGHolder &h,
}
for (const auto &v : inv_adjacent_vertices_range(h.accept, h)) {
// cppcheck-suppress knownConditionTrueFalse
if (state_ids.at(v) != NO_STATE) {
zombies.insert(v);
}

View File

@@ -262,6 +262,7 @@ static
bool hasSuffixLiterals(const set<ue2_literal> &s) {
for (auto it = s.begin(), ite = s.end(); it != ite; ++it) {
for (auto jt = std::next(it); jt != ite; ++jt) {
// cppcheck-suppress useStlAlgorithm
if (isSuffix(*it, *jt) || isSuffix(*jt, *it)) {
DEBUG_PRINTF("'%s' and '%s' have suffix issues\n",
dumpString(*it).c_str(),
@@ -530,7 +531,7 @@ void findMinCut(LitGraph &lg, vector<LitEdge> &cutset) {
vector<s32> distances(num_verts);
vector<LitEdge> predecessors(num_verts);
vector<u64a> residuals(num_edges(lg));
//cppcheck-suppress unreadVariable
UNUSED u64a flow = boykov_kolmogorov_max_flow(lg,
get(&LitGraphEdgeProps::score, lg),
make_iterator_property_map(residuals.begin(), e_index_map),