summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-07-16 09:40:47 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-07-16 09:40:47 -0700
commit86f10aa563a75a4cce703970faf2940f4f537e13 (patch)
tree4f19d07c6631542a1cace8cbbfb0cff00fd9844b /match.c
parent649c5caaeb83ad47a6239db5d76c3b3557fa639c (diff)
downloadtxr-86f10aa563a75a4cce703970faf2940f4f537e13.tar.gz
txr-86f10aa563a75a4cce703970faf2940f4f537e13.tar.bz2
txr-86f10aa563a75a4cce703970faf2940f4f537e13.zip
bugfix: pattern language undefined warning system.
* match.c (match_reg_var): The uw_tentative_def_exists check is being made against a symbol rather than the tag. This check will always fail. There is no ill consequence. Just that uw_register_tentative_def will be called redundantly when it doesn't have to be.
Diffstat (limited to 'match.c')
-rw-r--r--match.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/match.c b/match.c
index e137d8e3..c77a4e7d 100644
--- a/match.c
+++ b/match.c
@@ -4687,9 +4687,10 @@ val extract(val spec, val files, val predefined_bindings)
void match_reg_var(val sym)
{
- if (bindable(sym) && !uw_tentative_def_exists(sym)) {
+ if (bindable(sym)) {
val tag = cons(var_s, sym);
- uw_register_tentative_def(tag);
+ if (!uw_tentative_def_exists(tag))
+ uw_register_tentative_def(tag);
}
}