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.

Backport-PR-URL: #19447
PR-URL: #12730
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
mhdawson authored and MylesBorins committed Apr 16, 2018
1 parent 7507d1e commit 1785f3c
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 1785f3c

Please sign in to comment.