From 8aca66a1f32e436b187e99959c52e112de7147b8 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Fri, 28 Apr 2017 15:56:21 -0400 Subject: [PATCH] test: fix warning in n-api reference test Add cast to avoid warning during build of addon. PR-URL: https://github.com/nodejs/node/pull/12730 Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen --- test/addons-napi/test_reference/test_reference.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/addons-napi/test_reference/test_reference.c b/test/addons-napi/test_reference/test_reference.c index 1a238a560aac53..9be9fd135fb0e9 100644 --- a/test/addons-napi/test_reference/test_reference.c +++ b/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;