Skip to content

Commit

Permalink
test: fix warning in n-api reference test
Browse files Browse the repository at this point in the history
Add cast to avoid warning during build of addon.

PR-URL: #12730
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
mhdawson authored and addaleax committed May 3, 2017
1 parent 21653b6 commit 8aca66a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/addons-napi/test_reference/test_reference.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ napi_value CheckExternal(napi_env env, napi_callback_info info) {

NAPI_ASSERT(env, argtype == napi_external, "Expected an external value.")

int* data;
void* data;
NAPI_CALL(env, napi_get_value_external(env, arg, &data));

NAPI_ASSERT(env, data != NULL && *data == test_value,
NAPI_ASSERT(env, data != NULL && *(int*)data == test_value,
"An external data value of 1 was expected.")

return NULL;
Expand Down

0 comments on commit 8aca66a

Please sign in to comment.