summaryrefslogtreecommitdiffstats
path: root/generic/regcomp.c
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2006-09-27 20:37:10 (GMT)
committermsofer <msofer@noemail.net>2006-09-27 20:37:10 (GMT)
commit7db87a864dc1ee31fb0a4efd953be3a10dd51ac8 (patch)
treeb3bebf4bc9b210c627d0bdf7a3367ae9e567015d /generic/regcomp.c
parent378a2a119431a2f2cf3336f1aada122f25b560b9 (diff)
downloadtcl-7db87a864dc1ee31fb0a4efd953be3a10dd51ac8.zip
tcl-7db87a864dc1ee31fb0a4efd953be3a10dd51ac8.tar.gz
tcl-7db87a864dc1ee31fb0a4efd953be3a10dd51ac8.tar.bz2
* generic/regc_cvec.c (addmcce):
* generic/regcomp.c (compile): the static function addmcce does nothing when called with two NULL pointers; the only call is by compile with two NULL pointers (regcomp.c #includes regc_cvec.c). The whole thing is now ifdef'ed out with the macro REGEXP_ADDMCCE_UNUSED. This also silences coverity's #7. FossilOrigin-Name: fa0a132f0edc7fab8aeaae5b33e79093b21d837c
Diffstat (limited to 'generic/regcomp.c')
-rw-r--r--generic/regcomp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/generic/regcomp.c b/generic/regcomp.c
index c6c7342..fb159cb 100644
--- a/generic/regcomp.c
+++ b/generic/regcomp.c
@@ -171,7 +171,9 @@ static struct cvec *newcvec(int, int, int);
static struct cvec *clearcvec(struct cvec *);
static VOID addchr(struct cvec *, pchr);
static VOID addrange(struct cvec *, pchr, pchr);
+#ifdef REGEXP_ADDMCCE_UNUSED
static VOID addmcce(struct cvec *, chr *, chr *);
+#endif
static int haschr(struct cvec *, pchr);
static struct cvec *getcvec(struct vars *, int, int, int);
static VOID freecvec(struct cvec *);
@@ -364,7 +366,10 @@ compile(
CNOERR();
v->mcces = allmcces(v, v->mcces);
leaders(v, v->mcces);
+#ifdef REGEXP_ADDMCCE_UNUSED
+ /* Function does nothing with NULL pointers */
addmcce(v->mcces, (chr *)NULL, (chr *)NULL); /* dummy */
+#endif
}
CNOERR();