mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-19 10:34:25 +03:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user