Skip to content

Commit 5698cc0

Browse files
Gabriel Schulhofcodebytere
Gabriel Schulhof
authored andcommitted
n-api: fix test_async_context warnings
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: #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>
1 parent bcbf176 commit 5698cc0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/node-api/test_async_context/binding.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static napi_value MakeCallback(napi_env env, napi_callback_info info) {
2727
NAPI_CALL(env, napi_typeof(env, func, &func_type));
2828

2929
napi_async_context context;
30-
NAPI_CALL(env, napi_unwrap(env, async_context_wrap, &context));
30+
NAPI_CALL(env, napi_unwrap(env, async_context_wrap, (void**)&context));
3131

3232
napi_value result;
3333
if (func_type == napi_function) {
@@ -97,7 +97,8 @@ static napi_value DestroyAsyncResource(napi_env env, napi_callback_info info) {
9797
napi_value async_context_wrap = args[0];
9898

9999
napi_async_context async_context;
100-
NAPI_CALL(env, napi_remove_wrap(env, async_context_wrap, &async_context));
100+
NAPI_CALL(env,
101+
napi_remove_wrap(env, async_context_wrap, (void**)&async_context));
101102
NAPI_CALL(env, napi_async_destroy(env, async_context));
102103

103104
return async_context_wrap;

0 commit comments

Comments
 (0)