From 17692ffc5fd8317109291d896b42f35e1bd236b7 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 18 Sep 2023 13:43:56 +0800 Subject: [PATCH] Revert "interpreters/duktape: Fix error: variable 'num_stmts' set but not used" This reverts commit 801046cd7857ae0fab00c7bdac0e5a761a612af8. --- interpreters/duktape/Makefile | 1 - interpreters/duktape/not_used.patch | 42 ----------------------------- 2 files changed, 43 deletions(-) delete mode 100644 interpreters/duktape/not_used.patch diff --git a/interpreters/duktape/Makefile b/interpreters/duktape/Makefile index 4da4e6e81..699fb4f79 100644 --- a/interpreters/duktape/Makefile +++ b/interpreters/duktape/Makefile @@ -58,7 +58,6 @@ $(DUKTAPE_UNPACK): $(DUKTAPE_TARBALL) $(Q) mv duktape-$(DUKTAPE_VERSION) $(DUKTAPE_UNPACK) $(Q) echo "Patching $(DUKTAPE_UNPACK)" $(Q) patch -p0 < duk_cmdline.patch - $(Q) patch -p0 < not_used.patch $(DUKTAPE_UNPACK)/.patch: $(DUKTAPE_UNPACK) $(Q) touch $(DUKTAPE_UNPACK)/.patch diff --git a/interpreters/duktape/not_used.patch b/interpreters/duktape/not_used.patch deleted file mode 100644 index e5957c21e..000000000 --- a/interpreters/duktape/not_used.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 1ed7f75cf9652b44bc5e1a81552bf4431e10697e 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 duktape/src-input/duk_js_compiler.c duktape/src-input/duk_js_compiler.c -index ecf03eaf..866371b5 100644 ---- duktape/src-input/duk_js_compiler.c -+++ duktape/src-input/duk_js_compiler.c -@@ -5567,7 +5567,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 */ -@@ -5646,7 +5645,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); - } -@@ -5665,7 +5663,6 @@ DUK_LOCAL void duk__parse_switch_stmt(duk_compiler_ctx *comp_ctx, duk_ivalue *re - tok == DUK_TOK_RCURLY) { - break; - } -- num_stmts++; - duk__parse_stmt(comp_ctx, res, 0 /*allow_source_elem*/); - } - --- -2.34.1 -