From 4571248f624d2daefefbc565a3fcc96c4e22c547 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 28 Nov 2016 22:52:10 -0800 Subject: Eliminate duplicated warning-suppressing function. * eval.c (warning_continue): Static function removed. (no_warn_expand): Use uw_muffle_warning instead of removed function. * parser.y (warning_continue): Static function removed. (parse_once): Use uw_muffle_warning instead of removed function. * unwind.c (uw_muffle_warning): New function. * unwind.h (uw_muffle_warning): Declared. --- parser.y | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'parser.y') diff --git a/parser.y b/parser.y index c39b3a8f..24114b88 100644 --- a/parser.y +++ b/parser.y @@ -1740,11 +1740,6 @@ void yybadtoken(parser_t *parser, int tok, val context) yyerrorf(scnr, lit("unexpected character ~a"), chr(tok), nao); } -static val warning_continue(val exc, val arg) -{ - uw_throw(continue_s, nil); -} - int parse_once(val stream, val name, parser_t *parser) { int res = 0; @@ -1759,7 +1754,8 @@ int parse_once(val stream, val name, parser_t *parser) parser->stream = stream; parser->name = name; - uw_push_handler(&uw_handler, cons(warning_s, nil), func_n2(warning_continue)); + uw_push_handler(&uw_handler, cons(warning_s, nil), + func_n1v(uw_muffle_warning)); uw_catch_begin(cons(error_s, nil), esym, eobj); -- cgit v1.2.3