Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

n-api: fix test_async_context warnings #36171

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/node-api/test_async_context/binding.c
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down