Skip to content

Commit 0641dd1

Browse files
authored
Fix few shadow warnings (#4409)
- declaration of ‘memidx’ shadows a previous local - declaration of ‘count’ shadows a previous local
1 parent 8ed89e2 commit 0641dd1

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

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
@@ -15024,8 +15024,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1502415024
case WASM_OP_STRING_NEW_LOSSY_UTF8:
1502515025
case WASM_OP_STRING_NEW_WTF8:
1502615026
{
15027-
uint32 memidx;
15028-
1502915027
#if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0
1503015028
func->has_memory_operations = true;
1503115029
#endif
@@ -15037,7 +15035,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1503715035
POP_I32();
1503815036
POP_I32();
1503915037
PUSH_REF(REF_TYPE_STRINGREF);
15040-
(void)memidx;
1504115038
break;
1504215039
}
1504315040
case WASM_OP_STRING_CONST:
@@ -15065,8 +15062,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1506515062
case WASM_OP_STRING_ENCODE_LOSSY_UTF8:
1506615063
case WASM_OP_STRING_ENCODE_WTF8:
1506715064
{
15068-
uint32 memidx;
15069-
1507015065
#if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0
1507115066
func->has_memory_operations = true;
1507215067
#endif
@@ -15078,7 +15073,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1507815073
POP_I32();
1507915074
POP_STRINGREF();
1508015075
PUSH_I32();
15081-
(void)memidx;
1508215076
break;
1508315077
}
1508415078
case WASM_OP_STRING_CONCAT:
@@ -15119,8 +15113,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1511915113
case WASM_OP_STRINGVIEW_WTF8_ENCODE_LOSSY_UTF8:
1512015114
case WASM_OP_STRINGVIEW_WTF8_ENCODE_WTF8:
1512115115
{
15122-
uint32 memidx;
15123-
1512415116
#if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0
1512515117
func->has_memory_operations = true;
1512615118
#endif
@@ -15135,7 +15127,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1513515127
POP_REF(REF_TYPE_STRINGVIEWWTF8);
1513615128
PUSH_I32();
1513715129
PUSH_I32();
15138-
(void)memidx;
1513915130
break;
1514015131
}
1514115132
case WASM_OP_STRINGVIEW_WTF8_SLICE:
@@ -15167,8 +15158,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1516715158
}
1516815159
case WASM_OP_STRINGVIEW_WTF16_ENCODE:
1516915160
{
15170-
uint32 memidx;
15171-
1517215161
#if WASM_ENABLE_JIT != 0 || WASM_ENABLE_WAMR_COMPILER != 0
1517315162
func->has_memory_operations = true;
1517415163
#endif
@@ -15182,7 +15171,6 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func,
1518215171
POP_I32();
1518315172
POP_REF(REF_TYPE_STRINGVIEWWTF16);
1518415173
PUSH_I32();
15185-
(void)memidx;
1518615174
break;
1518715175
}
1518815176
case WASM_OP_STRINGVIEW_WTF16_SLICE:

0 commit comments

Comments
 (0)