test: fix n-api addon build warnings
Fixed an MSVC warning on Windows: * test_general.c - Lossy conversion from int64 to double, explicitly casting to double resolved the warning PR-URL: https://github.com/nodejs/node/pull/21808 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
d7496bff93
commit
f8d34b902e
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user