mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
supress knownConditionTrueFalse
This commit is contained in:
parent
5145b6d2ab
commit
da8fd7f661
@ -331,6 +331,7 @@ void buildReachMapping(const build_info &args, vector<NFAStateSet> &reach,
|
|||||||
vector<NFAVertex> verts;
|
vector<NFAVertex> verts;
|
||||||
verts.reserve(args.num_states);
|
verts.reserve(args.num_states);
|
||||||
auto sidat = [&state_ids=state_ids](const NFAVertex &v) {
|
auto sidat = [&state_ids=state_ids](const NFAVertex &v) {
|
||||||
|
// cppcheck-suppress knownConditionTrueFalse
|
||||||
return (state_ids.at(v) != NO_STATE);
|
return (state_ids.at(v) != NO_STATE);
|
||||||
};
|
};
|
||||||
const auto &vr = vertices_range(h);
|
const auto &vr = vertices_range(h);
|
||||||
@ -1218,10 +1219,11 @@ bool hasSquashableInitDs(const build_info &args) {
|
|||||||
static
|
static
|
||||||
bool hasInitDsStates(const NGHolder &h,
|
bool hasInitDsStates(const NGHolder &h,
|
||||||
const unordered_map<NFAVertex, u32> &state_ids) {
|
const unordered_map<NFAVertex, u32> &state_ids) {
|
||||||
|
// cppcheck-suppress knownConditionTrueFalse
|
||||||
if (state_ids.at(h.startDs) != NO_STATE) {
|
if (state_ids.at(h.startDs) != NO_STATE) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
// cppcheck-suppress knownConditionTrueFalse
|
||||||
if (is_triggered(h) && state_ids.at(h.start) != NO_STATE) {
|
if (is_triggered(h) && state_ids.at(h.start) != NO_STATE) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1696,7 +1698,7 @@ static
|
|||||||
bool cannotDie(const build_info &args) {
|
bool cannotDie(const build_info &args) {
|
||||||
const auto &h = args.h;
|
const auto &h = args.h;
|
||||||
const auto &state_ids = args.state_ids;
|
const auto &state_ids = args.state_ids;
|
||||||
|
// cppcheck-suppress knownConditionTrueFalse
|
||||||
// If we have a startDs we're actually using, we can't die.
|
// If we have a startDs we're actually using, we can't die.
|
||||||
if (state_ids.at(h.startDs) != NO_STATE) {
|
if (state_ids.at(h.startDs) != NO_STATE) {
|
||||||
DEBUG_PRINTF("is using startDs\n");
|
DEBUG_PRINTF("is using startDs\n");
|
||||||
|
@ -512,6 +512,7 @@ set<NFAVertex> findZombies(const NGHolder &h,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const auto &v : inv_adjacent_vertices_range(h.accept, h)) {
|
for (const auto &v : inv_adjacent_vertices_range(h.accept, h)) {
|
||||||
|
// cppcheck-suppress knownConditionTrueFalse
|
||||||
if (state_ids.at(v) != NO_STATE) {
|
if (state_ids.at(v) != NO_STATE) {
|
||||||
zombies.insert(v);
|
zombies.insert(v);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user