Index: test/cctest/wasm/wasm-run-utils.h |
diff --git a/test/cctest/wasm/wasm-run-utils.h b/test/cctest/wasm/wasm-run-utils.h |
index 8fc3528faf7221fb3af249ce3199d780c0c3e30f..a1ea4d133fba3e97d5153f8ef536d4bfbf2f68ad 100644 |
--- a/test/cctest/wasm/wasm-run-utils.h |
+++ b/test/cctest/wasm/wasm-run-utils.h |
@@ -164,7 +164,9 @@ class TestingModule : public ModuleEnv { |
module->functions = new std::vector<WasmFunction>(); |
instance->function_code = new std::vector<Handle<Code>>(); |
} |
- module->functions->push_back({sig, 0, 0, 0, 0, 0, 0, 0, false, false}); |
+ uint32_t index = static_cast<uint32_t>(module->functions->size()); |
+ module->functions->push_back( |
+ {sig, index, 0, 0, 0, 0, 0, 0, 0, false, false}); |
instance->function_code->push_back(code); |
return &module->functions->back(); |
} |