diff --git a/src/wasm/ngx_wasm_ops.c b/src/wasm/ngx_wasm_ops.c index e7d59153f..a11bc5f70 100644 --- a/src/wasm/ngx_wasm_ops.c +++ b/src/wasm/ngx_wasm_ops.c @@ -126,7 +126,7 @@ ngx_wasm_ops_plan_load(ngx_wasm_ops_plan_t *plan, ngx_log_t *log) ngx_uint_t *fid; ngx_array_t *ids; ngx_wasm_op_t *op; - ngx_wasm_ops_pipeline_t *pipeline; + ngx_wasm_ops_pipeline_t *pipeline = NULL; dd("enter"); diff --git a/src/wasm/wrt/ngx_wrt_v8.c b/src/wasm/wrt/ngx_wrt_v8.c index 55e325292..adc1d3677 100644 --- a/src/wasm/wrt/ngx_wrt_v8.c +++ b/src/wasm/wrt/ngx_wrt_v8.c @@ -452,7 +452,9 @@ ngx_v8_init_instance(ngx_wrt_instance_t *instance, ngx_wrt_store_t *store, ngx_wrt_module_t *module, ngx_pool_t *pool, ngx_wrt_err_t *err) { size_t i; +#if (NGX_DEBUG) ngx_uint_t nimports = 0; +#endif ngx_wavm_hfunc_t *import; ngx_v8_hfunc_ctx_t *hctx = NULL; wasm_func_t *func; @@ -485,7 +487,9 @@ ngx_v8_init_instance(ngx_wrt_instance_t *instance, ngx_wrt_store_t *store, hctx, NULL); instance->imports[i] = wasm_func_as_extern(func); +#if (NGX_DEBUG) nimports++; +#endif } ngx_wasm_assert(nimports == module->nimports); diff --git a/src/wasm/wrt/ngx_wrt_wasmer.c b/src/wasm/wrt/ngx_wrt_wasmer.c index 05aed26b3..5bb397555 100644 --- a/src/wasm/wrt/ngx_wrt_wasmer.c +++ b/src/wasm/wrt/ngx_wrt_wasmer.c @@ -515,7 +515,9 @@ ngx_wasmer_init_instance(ngx_wrt_instance_t *instance, ngx_wrt_store_t *store, ngx_wrt_module_t *module, ngx_pool_t *pool, ngx_wrt_err_t *err) { size_t i, j; +#if (NGX_DEBUG) ngx_uint_t nimports = 0; +#endif ngx_wrt_import_t *import; ngx_wasmer_hfunc_ctx_t *hctx, *hctxs = NULL; wasm_func_t *func; @@ -558,7 +560,9 @@ ngx_wasmer_init_instance(ngx_wrt_instance_t *instance, ngx_wrt_store_t *store, instance->env.data[i] = (wasm_extern_t *) wasmer_named_extern_unwrap( instance->wasi_imports.data[j]); +#if (NGX_DEBUG) nimports++; +#endif break; } } @@ -576,7 +580,9 @@ ngx_wasmer_init_instance(ngx_wrt_instance_t *instance, ngx_wrt_store_t *store, hctx, NULL); instance->env.data[i] = wasm_func_as_extern(func); +#if (NGX_DEBUG) nimports++; +#endif break; default: