mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
138c88c7da
Summary: react-native-windows builds treat a lot of c++ compiler warnings as errors. Including ones that cause value truncation when assigning `size_t` values to an `int`. This fixes the compiler warning, by using `size_t` as the type for `i`, which matches `size`. I then modified the loop to avoid the value underflow that occurs when decrementing an unsigned zero value. ## Changelog [Internal] [Changed] - Fix compiler warnings around mixing int and size_t usage in unsafe ways Pull Request resolved: https://github.com/facebook/react-native/pull/34889 Test Plan: This code change was made in react-native-windows when integrating latest react-native changes. -- our fabric implementation was able to run through this code without any issues. Reviewed By: mdvacca Differential Revision: D40158306 Pulled By: rozele fbshipit-source-id: b6858cb953635b37fd63a88ed1a372eb3dc394f7