Skip to content

Commit

Permalink
test: fix n-api addon build warnings
Browse files Browse the repository at this point in the history
Fixed an MSVC warning on Windows:
* test_general.c - Lossy conversion from int64 to double, explicitly
  casting to double resolved the warning
  • Loading branch information
kfarnung committed Jul 16, 2018
1 parent 210fea5 commit 8d12e3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/addons-napi/test_general/test_general.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static napi_value testAdjustExternalMemory(napi_env env, napi_callback_info info
int64_t adjustedValue;

NAPI_CALL(env, napi_adjust_external_memory(env, 1, &adjustedValue));
NAPI_CALL(env, napi_create_double(env, adjustedValue, &result));
NAPI_CALL(env, napi_create_double(env, (double)adjustedValue, &result));

return result;
}
Expand Down

0 comments on commit 8d12e3a

Please sign in to comment.