From 2d382d8445f5b02441123183e6a2f06cb746301f Mon Sep 17 00:00:00 2001 From: "liang.he@intel.com" Date: Tue, 24 Jun 2025 12:42:33 +0000 Subject: [PATCH] Fix few shadow warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - declaration of ‘memidx’ shadows a previous local - declaration of ‘count’ shadows a previous local --- core/iwasm/interpreter/wasm_interp_classic.c | 2 +- core/iwasm/interpreter/wasm_loader.c | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/core/iwasm/interpreter/wasm_interp_classic.c b/core/iwasm/interpreter/wasm_interp_classic.c index 1e98b0fa91..07cf6c1ffd 100644 --- a/core/iwasm/interpreter/wasm_interp_classic.c +++ b/core/iwasm/interpreter/wasm_interp_classic.c @@ -4088,7 +4088,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, case WASM_OP_STRING_ENCODE_LOSSY_UTF8_ARRAY: case WASM_OP_STRING_ENCODE_WTF8_ARRAY: { - uint32 start, array_len, count; + uint32 start, array_len; int32 bytes_written; EncodingFlag flag = WTF8; WASMArrayType *array_type; diff --git a/core/iwasm/interpreter/wasm_loader.c b/core/iwasm/interpreter/wasm_loader.c index c8b4e6b7d9..8fe1216661 100644 --- a/core/iwasm/interpreter/wasm_loader.c +++ b/core/iwasm/interpreter/wasm_loader.c @@ -15023,8 +15023,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, case WASM_OP_STRING_NEW_LOSSY_UTF8: case WASM_OP_STRING_NEW_WTF8: { - uint32 memidx; - #if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0 func->has_memory_operations = true; #endif @@ -15036,7 +15034,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, POP_I32(); POP_I32(); PUSH_REF(REF_TYPE_STRINGREF); - (void)memidx; break; } case WASM_OP_STRING_CONST: @@ -15064,8 +15061,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, case WASM_OP_STRING_ENCODE_LOSSY_UTF8: case WASM_OP_STRING_ENCODE_WTF8: { - uint32 memidx; - #if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0 func->has_memory_operations = true; #endif @@ -15077,7 +15072,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, POP_I32(); POP_STRINGREF(); PUSH_I32(); - (void)memidx; break; } case WASM_OP_STRING_CONCAT: @@ -15118,8 +15112,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, case WASM_OP_STRINGVIEW_WTF8_ENCODE_LOSSY_UTF8: case WASM_OP_STRINGVIEW_WTF8_ENCODE_WTF8: { - uint32 memidx; - #if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0 func->has_memory_operations = true; #endif @@ -15134,7 +15126,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, POP_REF(REF_TYPE_STRINGVIEWWTF8); PUSH_I32(); PUSH_I32(); - (void)memidx; break; } case WASM_OP_STRINGVIEW_WTF8_SLICE: @@ -15166,8 +15157,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, } case WASM_OP_STRINGVIEW_WTF16_ENCODE: { - uint32 memidx; - #if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0 func->has_memory_operations = true; #endif @@ -15181,7 +15170,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, POP_I32(); POP_REF(REF_TYPE_STRINGVIEWWTF16); PUSH_I32(); - (void)memidx; break; } case WASM_OP_STRINGVIEW_WTF16_SLICE: