diff --git a/src/nfa/limex_compile.cpp b/src/nfa/limex_compile.cpp index 39214bd8..48678d3d 100644 --- a/src/nfa/limex_compile.cpp +++ b/src/nfa/limex_compile.cpp @@ -331,6 +331,7 @@ void buildReachMapping(const build_info &args, vector &reach, vector verts; verts.reserve(args.num_states); auto sidat = [&state_ids=state_ids](const NFAVertex &v) { + // cppcheck-suppress knownConditionTrueFalse return (state_ids.at(v) != NO_STATE); }; const auto &vr = vertices_range(h); @@ -1218,10 +1219,11 @@ bool hasSquashableInitDs(const build_info &args) { static bool hasInitDsStates(const NGHolder &h, const unordered_map &state_ids) { + // cppcheck-suppress knownConditionTrueFalse if (state_ids.at(h.startDs) != NO_STATE) { return true; } - + // cppcheck-suppress knownConditionTrueFalse if (is_triggered(h) && state_ids.at(h.start) != NO_STATE) { return true; } @@ -1696,7 +1698,7 @@ static bool cannotDie(const build_info &args) { const auto &h = args.h; const auto &state_ids = args.state_ids; - + // cppcheck-suppress knownConditionTrueFalse // If we have a startDs we're actually using, we can't die. if (state_ids.at(h.startDs) != NO_STATE) { DEBUG_PRINTF("is using startDs\n"); diff --git a/src/nfagraph/ng_limex.cpp b/src/nfagraph/ng_limex.cpp index 0160f6ea..b97162ce 100644 --- a/src/nfagraph/ng_limex.cpp +++ b/src/nfagraph/ng_limex.cpp @@ -512,6 +512,7 @@ set 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); }