From a399bf438045943229020e7b89203c855fd96eb5 Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Mon, 14 Apr 2025 16:44:42 +0800 Subject: [PATCH] fix: Remove unused variables in SIMD_v128_const case Fix compiler warnings about unused variables `high` and `low` in the `SIMD_v128_const` case. These variables are only needed inside the `WASM_ENABLE_FAST_INTERP != 0` conditional block, but were incorrectly declared outside of it, causing unused variable warnings. Signed-off-by: Huang Qi --- core/iwasm/interpreter/wasm_loader.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/iwasm/interpreter/wasm_loader.c b/core/iwasm/interpreter/wasm_loader.c index 10a20e313b..fc68e5966f 100644 --- a/core/iwasm/interpreter/wasm_loader.c +++ b/core/iwasm/interpreter/wasm_loader.c @@ -15624,7 +15624,9 @@ wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, /* basic operation */ case SIMD_v128_const: { +#if WASM_ENABLE_FAST_INTERP != 0 uint64 high, low; +#endif CHECK_BUF1(p, p_end, 16); #if WASM_ENABLE_FAST_INTERP != 0 wasm_runtime_read_v128(p, &high, &low);