diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.cpp b/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.cpp index 2aafcbd036eac6..f03d8060c92fb7 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.cpp @@ -33,7 +33,7 @@ const RawValue* RawPropsParser::at( // 4950 lookups and equality checks on initialization of the parser, which // happens exactly once per component. size_t size = keys_.size(); - for (int i = 0; i < size; i++) { + for (size_t i = 0; i < size; i++) { if (keys_[i] == key) { return nullptr; } @@ -69,7 +69,8 @@ const RawValue* RawPropsParser::at( do { rawProps.keyIndexCursor_++; - if (UNLIKELY(rawProps.keyIndexCursor_ >= keys_.size())) { + if (UNLIKELY( + static_cast(rawProps.keyIndexCursor_) >= keys_.size())) { #ifdef REACT_NATIVE_DEBUG if (resetLoop) { LOG(ERROR) diff --git a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp index 641b6d26546b95..d51cb8ff2311a1 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.cpp @@ -243,7 +243,7 @@ void ShadowNode::replaceChild( auto& children = const_cast(*children_); auto size = children.size(); - if (suggestedIndex != -1 && suggestedIndex < size) { + if (suggestedIndex != -1 && static_cast(suggestedIndex) < size) { // If provided `suggestedIndex` is accurate, // replacing in place using the index. if (children.at(suggestedIndex).get() == &oldChild) {