Merge pull request #255 from isildur-g/wip-isildur-g

addressing some cppcheck warnings.
This commit is contained in:
Konstantinos Margaritis
2024-04-24 12:39:17 +03:00
committed by GitHub
9 changed files with 8 additions and 25 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,9 @@ depth_done:
return true;
}
}
}
// Second option: a two-byte shufti (i.e. less than eight 2-byte
// literals)
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,18 +267,6 @@ 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;
}
}
DEBUG_PRINTF("checking acyclic+selfloop graph\n");
rv = !firstMatchIsFirst(c_g);