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 Olivier Martin committed May 6, 2017
1 parent fa0e495 commit aa6d542
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 aa6d542

Please sign in to comment.