From f99e3f2f91e56ae79e18f4849be82c6d15508e5d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 21 Mar 2023 21:32:55 -0700 Subject: 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. --- lib.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib.c') diff --git a/lib.c b/lib.c index b3abef2e..f9b6ee30 100644 --- a/lib.c +++ b/lib.c @@ -14935,6 +14935,7 @@ void init(val *stack_bottom) parse_init(); uw_late_init(); less_tab_init(); + eval_late_init(); #if HAVE_SYSLOG syslog_init(); #endif -- cgit v1.2.3