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: nodejs#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 Gabriel Schulhof committed Apr 10, 2018
1 parent e89a911 commit f14a0bb
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 f14a0bb

Please sign in to comment.