summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schulhof <gabriel.schulhof@intel.com>2020-11-18 16:33:06 -0800
committerBeth Griggs <bgriggs@redhat.com>2020-12-15 20:15:25 +0000
commit7a01e241ee0a766952fd6908b4b4980a36b8798d (patch)
treef0f9788d0d5d3c9f8814867d42823286a6c4d32d
parent6d43c8dd69c541f0f7378a57756d77573f5b2923 (diff)
downloadnode-new-7a01e241ee0a766952fd6908b4b4980a36b8798d.tar.gz
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>
-rw-r--r--test/node-api/test_async_context/binding.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/node-api/test_async_context/binding.c b/test/node-api/test_async_context/binding.c
index 749bb05d25..3dab0fd0e8 100644
--- a/test/node-api/test_async_context/binding.c
+++ b/test/node-api/test_async_context/binding.c
@@ -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;