ddressing some cppcheck warnings. yes this will be cleaned up in a

following commit. tests pass.
This commit is contained in:
G.E
2024-04-23 19:08:24 +03:00
parent 5ebc19674c
commit e3bc8ca0a8
9 changed files with 23 additions and 23 deletions

View File

@@ -193,9 +193,6 @@ void reduceGraph(NGHolder &g, som_type som, bool utf8,
if (!som) {
mergeCyclicDotStars(g);
}
if (!som) {
removeSiblingsOfStartDotStar(g);
}
}

View File

@@ -811,11 +811,11 @@ depth_done:
return true;
}
}
}
// }
// Second option: a two-byte shufti (i.e. less than eight 2-byte
// literals)
if (depth > 1) {
// if (depth > 1) {
for (unsigned int i = 0; i < (depth - 1); i++) {
if (depthReach[i].count() * depthReach[i+1].count()
<= DOUBLE_SHUFTI_LIMIT) {

View File

@@ -267,17 +267,18 @@ bool somMayGoBackwards(NFAVertex u, const NGHolder &g,
boost::depth_first_search(c_g, visitor(backEdgeVisitor)
.root_vertex(c_g.start));
for (const auto &e : be) {
NFAVertex s = source(e, c_g);
NFAVertex t = target(e, c_g);
DEBUG_PRINTF("back edge %zu %zu\n", c_g[s].index, c_g[t].index);
if (s != t) {
assert(0);
DEBUG_PRINTF("eek big cycle\n");
rv = true; /* big cycle -> eek */
goto exit;
}
}
// with be.clear right above does this ever run at all?
//for (const auto &e : be) {
// NFAVertex s = source(e, c_g);
// NFAVertex t = target(e, c_g);
// DEBUG_PRINTF("back edge %zu %zu\n", c_g[s].index, c_g[t].index);
// if (s != t) {
// assert(0);
// DEBUG_PRINTF("eek big cycle\n");
// rv = true; /* big cycle -> eek */
// goto exit;
// }
//}
DEBUG_PRINTF("checking acyclic+selfloop graph\n");