Skip to content
Permalink
Browse files

test: fix warning in n-api reference test

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 Apr 28, 2017
1 parent 21653b6 commit 8aca66a1f32e436b187e99959c52e112de7147b8
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/addons-napi/test_reference/test_reference.c
@@ -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;

0 comments on commit 8aca66a

Please sign in to comment.
You can’t perform that action at this time.