From fc3153ad652da784cda1f97e112e2c3c8e967855 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 11 Sep 2023 18:02:36 +0800 Subject: [PATCH] Fix Error: duktape/src-noline/duktape.c:73222:13: error: variable 'num_stmts' set but not used [-Werror,-Wunused-but-set-variable] Signed-off-by: Xiang Xiao --- src-input/duk_js_compiler.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src-input/duk_js_compiler.c b/src-input/duk_js_compiler.c index 8f55ef48c..baf748d32 100644 --- a/src-input/duk_js_compiler.c +++ b/src-input/duk_js_compiler.c @@ -5722,7 +5722,6 @@ DUK_LOCAL void duk__parse_switch_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re temp_at_loop = DUK__GETTEMP(comp_ctx); for (;;) { - duk_int_t num_stmts; duk_small_uint_t tok; /* sufficient for keeping temp reg numbers in check */ @@ -5797,7 +5796,6 @@ DUK_LOCAL void duk__parse_switch_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re * test-bug-case-fallthrough.js. */ - num_stmts = 0; if (pc_default == -2) { pc_default = duk__get_current_pc(comp_ctx); } @@ -5815,7 +5813,6 @@ DUK_LOCAL void duk__parse_switch_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re if (tok == DUK_TOK_CASE || tok == DUK_TOK_DEFAULT || tok == DUK_TOK_RCURLY) { break; } - num_stmts++; duk__parse_stmt(comp_ctx, res, 0 /*allow_source_elem*/); }