summaryrefslogtreecommitdiffstats
path: root/eval.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-03-21 21:32:55 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-03-21 21:32:55 -0700
commitf99e3f2f91e56ae79e18f4849be82c6d15508e5d (patch)
tree4ab65e1e462df1df5086cbf4772c41d2eb6cadbe /eval.h
parent3800dbb4dcb363419814735b7f1e00ff3544449b (diff)
downloadtxr-f99e3f2f91e56ae79e18f4849be82c6d15508e5d.tar.gz
txr-f99e3f2f91e56ae79e18f4849be82c6d15508e5d.tar.bz2
txr-f99e3f2f91e56ae79e18f4849be82c6d15508e5d.zip
ignerr: fix unused warning
The ignerr intrinsic macro generates code that has an unused variable. We fix it by turning it into a gensym, since unused warnings aren't generated for gensyms. * eval.c (unused_arg_s): New static variable. (me_ignerr): Use the value of unused_arg_s instead of error_s, for the argument of the catch clause. (eval_init): gc-protect unused_arg_s. (eval_late_init): New function in which we initialized unused_arg_s. The gensym function cannot be used during eval_init. * eval.h (eval_late_init): Declared. * lib.c (init): Call eval_late_init after some other late initializations.
Diffstat (limited to 'eval.h')
-rw-r--r--eval.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/eval.h b/eval.h
index dac4b1c1..a927666f 100644
--- a/eval.h
+++ b/eval.h
@@ -101,4 +101,5 @@ val pprinl(val obj, val stream);
val tprint(val obj, val out);
void eval_init(void);
+void eval_late_init(void);
void eval_compat_fixup(int compat_ver);