Skip to content

Commit

Permalink
n-api: fix test_async_context warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Schulhof <[email protected]>
PR-URL: #36171
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
  • Loading branch information
Gabriel Schulhof authored and BethGriggs committed Dec 15, 2020
1 parent 6d43c8d commit 7a01e24
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/node-api/test_async_context/binding.c
Original file line number Diff line number Diff line change
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

0 comments on commit 7a01e24

Please sign in to comment.