react-native-macos/ReactCommon
Andrew Coates 138c88c7da Fix warnings around mixing int and size_t usage in unsafe ways (#34889)
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
2022-10-06 16:25:44 -07:00
..
butter Back out "Mirror fbcode directory structure for container targets" 2022-08-30 21:42:26 -07:00
callinvoker Enable -Wpedantic in OSS Android Targets (#34403) 2022-08-13 00:12:42 -07:00
cxxreact chore: re-align version to be 1000.0.0 on main everywhere (#34817) 2022-10-04 08:36:21 -07:00
hermes Exclude Hermes debugger in release builds 2022-10-05 09:19:05 -07:00
jsengineinstance The life-changing magic of clang-tidying up 2020-02-04 11:09:30 -08:00
jsi Add external ArrayBuffers to JSI (#793) 2022-08-23 08:35:34 -07:00
jsiexecutor Remove molly dep from react-native buck graph 2022-08-11 04:53:34 -07:00
jsinspector Enable -Wpedantic for targets inside ReactCommon 2022-08-11 04:37:35 -07:00
libraries/fbcore/src/test/java/com/facebook/powermock Explicitly set language to JAVA where it is missing [xplat] (round 1) 2022-07-06 09:07:07 -07:00
logger Enable -Wpedantic for targets inside ReactCommon 2022-08-11 04:37:35 -07:00
react Fix warnings around mixing int and size_t usage in unsafe ways (#34889) 2022-10-06 16:25:44 -07:00
reactperflogger Enable -Wpedantic in OSS Android Targets (#34403) 2022-08-13 00:12:42 -07:00
runtimeexecutor Enable -Wpedantic in OSS Android Targets (#34403) 2022-08-13 00:12:42 -07:00
yoga Fix comment typo 'layed out' to 'laid out' (#1061) 2022-10-04 10:54:16 -07:00
React-Fabric.podspec Add Mapbuffer module to podspec (#34847) 2022-10-03 09:42:45 -07:00
React-bridging.podspec Enable pedantic warnings in C++ podspecs (#34404) 2022-08-17 14:20:01 -07:00
React-rncore.podspec bump iOS and tvOS from 11.0 to 12.4 in cocoapods 2022-03-16 21:08:01 -07:00
ReactCommon.podspec Enable pedantic warnings in C++ podspecs (#34404) 2022-08-17 14:20:01 -07:00