Description
Problem Description
[error]node_modules\react-native\ReactCommon\react\renderer\css\CSSTokenizer.h(139,22): Error C2220: the following warning is treated as an error
2>D:\a_work\1\s\node_modules\react-native\ReactCommon\react\renderer\css\CSSTokenizer.h(139,22): error C2220: the following warning is treated as an error [D:\a_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
(compiling source file '../../node_modules/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp')
##[error]node_modules\react-native\ReactCommon\react\renderer\css\CSSTokenizer.h(139,22): Error C4244: 'initializing': conversion from 'double' to 'int32_t', possible loss of data
2>D:\a_work\1\s\node_modules\react-native\ReactCommon\react\renderer\css\CSSTokenizer.h(139,22): error C4244: 'initializing': conversion from 'double' to 'int32_t', possible loss of data [D:\a_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
(compiling source file '../../node_modules/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp')
##[error]node_modules\react-native\ReactCommon\react\renderer\css\CSSTokenizer.h(142,20): Error C4244: '=': conversion from 'double' to 'int32_t', possible loss of data
2>D:\a_work\1\s\node_modules\react-native\ReactCommon\react\renderer\css\CSSTokenizer.h(142,20): error C4244: '=': conversion from 'double' to 'int32_t', possible loss of data [D:\a_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
(compiling source file '../../node_modules/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp')
##[error]node_modules\react-native\ReactCommon\react\renderer\css\CSSTokenizer.h(164,26): Error C4244: 'initializing': conversion from 'double' to 'int32_t', possible loss of data
2>D:\a_work\1\s\node_modules\react-native\ReactCommon\react\renderer\css\CSSTokenizer.h(164,26): error C4244: 'initializing': conversion from 'double' to 'int32_t', possible loss of data [D:\a_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
(compiling source file '../../node_modules/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp')
##[error]node_modules\react-native\ReactCommon\react\renderer\css\CSSTokenizer.h(172,26): Error C4244: '=': conversion from 'double' to 'int32_t', possible loss of data
2>D:\a_work\1\s\node_modules\react-native\ReactCommon\react\renderer\css\CSSTokenizer.h(172,26): error C4244: '=': conversion from 'double' to 'int32_t', possible loss of data [D:\a_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
(compiling source file '../../node_modules/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp')
##[error]node_modules\react-native\ReactCommon\react\renderer\css\CSSHexColor.h(37,24): Error C4244: 'return': conversion from 'int' to 'uint8_t', possible loss of data
2>D:\a_work\1\s\node_modules\react-native\ReactCommon\react\renderer\css\CSSHexColor.h(37,24): error C4244: 'return': conversion from 'int' to 'uint8_t', possible loss of data [D:\a_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
(compiling source file '../../node_modules/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp')
##[error]node_modules\react-native\ReactCommon\react\renderer\css\CSSHexColor.h(39,12): Error C4244: 'return': conversion from 'int' to 'uint8_t', possible loss of data
constexpr CSSToken consumeNumber() {
// https://www.w3.org/TR/css-syntax-3/#consume-number
// https://www.w3.org/TR/css-syntax-3/#convert-a-string-to-a-number
auto* b = remainingCharacters_.data();
auto* e = b + remainingCharacters_.size();
float value = 0.0f;
fast_float::parse_options options{
fast_float::chars_format::general |
fast_float::chars_format::allow_leading_plus};
auto [ptr, ec] = fast_float::from_chars_advanced(b, e, value, options);
// Do we need to handle any other errors?
// bool isOk = ec == std::errc();
position_ += static_cast<size_t>(ptr - b);
consumeRunningValue();
return CSSToken{CSSTokenType::Number, static_cast(value)};
}
Link to the integration where the error originated
https://github.com/microsoft/react-native-windows/pull/14662/checks?check_run_id=42184463784
Link to commit
Forked files
No response
Upstream PR
No response
Build Configuration
None