Skip to content

Commit 7493efa

Browse files
committed
fix few shadow warnings
- declaration of ‘memidx’ shadows a previous local - declaration of ‘count’ shadows a previous local
1 parent bc8e62c commit 7493efa

2 files changed

Lines changed: 1 addition & 13 deletions

File tree

core/iwasm/interpreter/wasm_interp_classic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4088,7 +4088,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
40884088
case WASM_OP_STRING_ENCODE_LOSSY_UTF8_ARRAY:
40894089
case WASM_OP_STRING_ENCODE_WTF8_ARRAY:
40904090
{
4091-
uint32 start, array_len, count;
4091+
uint32 start, array_len;
40924092
int32 bytes_written;
40934093
EncodingFlag flag = WTF8;
40944094
WASMArrayType *array_type;

core/iwasm/interpreter/wasm_loader.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15023,8 +15023,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1502315023
case WASM_OP_STRING_NEW_LOSSY_UTF8:
1502415024
case WASM_OP_STRING_NEW_WTF8:
1502515025
{
15026-
uint32 memidx;
15027-
1502815026
#if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0
1502915027
func->has_memory_operations = true;
1503015028
#endif
@@ -15036,7 +15034,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1503615034
POP_I32();
1503715035
POP_I32();
1503815036
PUSH_REF(REF_TYPE_STRINGREF);
15039-
(void)memidx;
1504015037
break;
1504115038
}
1504215039
case WASM_OP_STRING_CONST:
@@ -15064,8 +15061,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1506415061
case WASM_OP_STRING_ENCODE_LOSSY_UTF8:
1506515062
case WASM_OP_STRING_ENCODE_WTF8:
1506615063
{
15067-
uint32 memidx;
15068-
1506915064
#if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0
1507015065
func->has_memory_operations = true;
1507115066
#endif
@@ -15077,7 +15072,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1507715072
POP_I32();
1507815073
POP_STRINGREF();
1507915074
PUSH_I32();
15080-
(void)memidx;
1508115075
break;
1508215076
}
1508315077
case WASM_OP_STRING_CONCAT:
@@ -15118,8 +15112,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1511815112
case WASM_OP_STRINGVIEW_WTF8_ENCODE_LOSSY_UTF8:
1511915113
case WASM_OP_STRINGVIEW_WTF8_ENCODE_WTF8:
1512015114
{
15121-
uint32 memidx;
15122-
1512315115
#if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0
1512415116
func->has_memory_operations = true;
1512515117
#endif
@@ -15134,7 +15126,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1513415126
POP_REF(REF_TYPE_STRINGVIEWWTF8);
1513515127
PUSH_I32();
1513615128
PUSH_I32();
15137-
(void)memidx;
1513815129
break;
1513915130
}
1514015131
case WASM_OP_STRINGVIEW_WTF8_SLICE:
@@ -15166,8 +15157,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1516615157
}
1516715158
case WASM_OP_STRINGVIEW_WTF16_ENCODE:
1516815159
{
15169-
uint32 memidx;
15170-
1517115160
#if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0
1517215161
func->has_memory_operations = true;
1517315162
#endif
@@ -15181,7 +15170,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1518115170
POP_I32();
1518215171
POP_REF(REF_TYPE_STRINGVIEWWTF16);
1518315172
PUSH_I32();
15184-
(void)memidx;
1518515173
break;
1518615174
}
1518715175
case WASM_OP_STRINGVIEW_WTF16_SLICE:

0 commit comments

Comments
 (0)