Browse Source

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 <xiaoxiang@xiaomi.com>
pull/2545/head
Xiang Xiao 1 year ago
parent
commit
fc3153ad65
  1. 3
      src-input/duk_js_compiler.c

3
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*/);
}

Loading…
Cancel
Save