lunchclass / bacardi

Bacardi project is an effort to provide multi-language binding for Node.js native layer.
https://lunchclass.github.io/bacardi
Apache License 2.0
113 stars 17 forks source link

Fix warning in Examples #197

Open yjaeseok opened 6 years ago

yjaeseok commented 6 years ago

I'm submitting a ...

General infomration

Prerequisites

Description

We have some build warnings.

C:\projects\bacardi\core/js_type_traits.h(54): warning C4244: 'argument': conversion from 'int64_t' to 'double', possible loss of data (compiling source file ..\build\Release\obj\global_intermediate\examples\ternary_calculator_bridge.cc) [C:\projects\bacardi\build\bacardi.vcxproj] C:\projects\bacardi\core/js_type_traits.h(55): warning C4244: 'argument': conversion from 'uint64_t' to 'double', possible loss of data (compiling source file ..\build\Release\obj\global_intermediate\examples\ternary_calculator_bridge.cc) [C:\projects\bacardi\build\bacardi.vcxproj] C:\projects\bacardi\core/js_type_traits.h(54): warning C4244: 'argument': conversion from 'int64_t' to 'double', possible loss of data (compiling source file ..\build\Release\obj\global_intermediate\examples\calculator_bridge.cc) [C:\projects\bacardi\build\bacardi.vcxproj] C:\projects\bacardi\core/js_type_traits.h(55): warning C4244: 'argument': conversion from 'uint64_t' to 'double', possible loss of data (compiling source file ..\build\Release\obj\global_intermediate\examples\calculator_bridge.cc) [C:\projects\bacardi\build\bacardi.vcxproj] ..\build\Release\obj\global_intermediate\examples\calculator_bridge.cc(301): warning C4244: 'argument': conversion from 'double' to 'int64_t', possible loss of data [C:\projects\bacardi\build\bacardi.vcxproj] electron_native_bridge.cc test_interface_bridge.cc C:\projects\bacardi\core/js_type_traits.h(54): warning C4244: 'argument': conversion from 'int64_t' to 'double', possible loss of data (compiling source file ..\build\Release\obj\global_intermediate\examples\electron\native\electron_native_bridge.cc) [C:\projects\bacardi\build\bacardi.vcxproj] C:\projects\bacardi\core/js_type_traits.h(55): warning C4244: 'argument': conversion from 'uint64_t' to 'double', possible loss of data (compiling source file ..\build\Release\obj\global_intermediate\examples\electron\native\electron_native_bridge.cc) [C:\projects\bacardi\build\bacardi.vcxproj] bacardi.cc C:\projects\bacardi\core/js_type_traits.h(54): warning C4244: 'argument': conversion from 'int64_t' to 'double', possible loss of data (compiling source file ..\build\Release\obj\global_intermediate\test\test_interface_bridge.cc) [C:\projects\bacardi\build\bacardi.vcxproj] C:\projects\bacardi\core/js_type_traits.h(55): warning C4244: 'argument': conversion from 'uint64_t' to 'double', possible loss of data (compiling source file ..\build\Release\obj\global_intermediate\test\test_interface_bridge.cc)

Context (Environment)

Operating System

Additional Information on the environment

I see this warnings, in AppVeyor. Please refer to below link : https://ci.appveyor.com/project/romandev/bacardi/build/1.0.356/job/ynvl38uaec1r0r30

daehyunjimmy commented 6 years ago

I will handle this issue. :)

daehyunjimmy commented 6 years ago

now, static Number New (napi_env env, double value)'s parameter type is double. so, conversion from 'uint64_t' to 'double', could be possible loss of data.