summaryrefslogtreecommitdiffstats
path: root/generic/regcomp.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-08-28 09:59:26 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-08-28 09:59:26 (GMT)
commit652086dae44617a37ba892936aa67bf612054f6f (patch)
treead06f7fd343e736e4c770b30530f1f93b1c4f587 /generic/regcomp.c
parent590e913130ea8f55a5b78317e5798373b5f1c87d (diff)
downloadtcl-652086dae44617a37ba892936aa67bf612054f6f.zip
tcl-652086dae44617a37ba892936aa67bf612054f6f.tar.gz
tcl-652086dae44617a37ba892936aa67bf612054f6f.tar.bz2
Add /* FALLTHRU */ markers in various places (silencing possible GCC warnings). Eliminate some more "register" keywords. Eliminate (or silence) some unused function parameters.
Diffstat (limited to 'generic/regcomp.c')
-rw-r--r--generic/regcomp.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/generic/regcomp.c b/generic/regcomp.c
index 211cd70..3051446 100644
--- a/generic/regcomp.c
+++ b/generic/regcomp.c
@@ -59,7 +59,6 @@ static void wordchrs(struct vars *);
static struct subre *subre(struct vars *, int, int, struct state *, struct state *);
static void freesubre(struct vars *, struct subre *);
static void freesrnode(struct vars *, struct subre *);
-static void optst(struct vars *, struct subre *);
static int numst(struct subre *, int);
static void markst(struct subre *);
static void cleanst(struct vars *);
@@ -395,7 +394,6 @@ compile(
dumpnfa(v->nfa, debug);
dumpst(v->tree, debug, 1);
}
- optst(v, v->tree);
v->ntree = numst(v->tree, 1);
markst(v->tree);
cleanst(v);
@@ -923,7 +921,7 @@ parseqatom(
*/
NOTE(REG_UPBOTCH);
- /* fallthrough into case PLAIN */
+ /* FALLTHRU */
case PLAIN:
onechr(v, v->nextvalue, lp, rp);
okcolors(v->nfa, v->cm);
@@ -1812,25 +1810,6 @@ freesrnode(
}
/*
- - optst - optimize a subRE subtree
- ^ static void optst(struct vars *, struct subre *);
- */
-static void
-optst(
- struct vars *v,
- struct subre *t)
-{
- /*
- * DGP (2007-11-13): I assume it was the programmer's intent to eventually
- * come back and add code to optimize subRE trees, but the routine coded
- * just spends effort traversing the tree and doing nothing. We can do
- * nothing with less effort.
- */
-
- return;
-}
-
-/*
- numst - number tree nodes (assigning "id" indexes)
^ static int numst(struct subre *, int);
*/
@@ -2101,6 +2080,9 @@ dump(
}
fprintf(f, "\n");
dumpst(g->tree, f, 0);
+#else
+ (void)re;
+ (void)f;
#endif
}