mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
n-api: fix test_async_context warnings
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: https://github.com/nodejs/node/pull/36171 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
This commit is contained in:
1 parent
bcbf176c22
commit
5698cc08f0
1 file changed
+3
-2
@@ -27,7 +27,7 @@ static napi_value MakeCallback(napi_env env, napi_callback_info info) {
|
||||
NAPI_CALL(env, napi_typeof(env, func, &func_type));
|
||||
|
||||
napi_async_context context;
|
||||
NAPI_CALL(env, napi_unwrap(env, async_context_wrap, &context));
|
||||
NAPI_CALL(env, napi_unwrap(env, async_context_wrap, (void**)&context));
|
||||
|
||||
napi_value result;
|
||||
if (func_type == napi_function) {
|
||||
@@ -97,7 +97,8 @@ static napi_value DestroyAsyncResource(napi_env env, napi_callback_info info) {
|
||||
napi_value async_context_wrap = args[0];
|
||||
|
||||
napi_async_context async_context;
|
||||
NAPI_CALL(env, napi_remove_wrap(env, async_context_wrap, &async_context));
|
||||
NAPI_CALL(env,
|
||||
napi_remove_wrap(env, async_context_wrap, (void**)&async_context));
|
||||
NAPI_CALL(env, napi_async_destroy(env, async_context));
|
||||
|
||||
return async_context_wrap;
|
||||
|
||||
Reference in new issue
Block a user