From d0fdf5971f47a4f12c56f13691abb6e9980b0707 Mon Sep 17 00:00:00 2001 From: Zhidao HONG Date: Wed, 12 Jul 2023 09:31:22 +0800 Subject: NJS: workaround for the warning in nxt_js_call() on Freebsd12 gcc. --- src/nxt_js.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nxt_js.c b/src/nxt_js.c index 066d08f6..74663660 100644 --- a/src/nxt_js.c +++ b/src/nxt_js.c @@ -407,13 +407,12 @@ nxt_js_call(nxt_task_t *task, nxt_js_conf_t *jcf, nxt_js_cache_t *cache, return NXT_ERROR; } - ret = njs_vm_start(vm, njs_value_arg(&retval)); + cache->vm = vm; + + ret = njs_vm_start(vm, &cache->array); if (ret != NJS_OK) { return NXT_ERROR; } - - cache->vm = vm; - cache->array = *njs_value_arg(&retval); } value = njs_vm_array_prop(vm, &cache->array, js->index, &opaque_value); -- cgit