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

PR-URL: #21808
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
kfarnung authored and targos committed Aug 6, 2018
1 parent 1ca46ab commit d38ccaa
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 d38ccaa

Please sign in to comment.