From 82708c775e2e81665f2460271c021c5ece2010d0 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005287564 Date: Fri, 12 Sep 2025 03:52:25 -0700 Subject: [PATCH] Fix CQS signal readability-isolate-declaration in xplat/js/react-native-github/packages (#53747) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53747 Reviewed By: javache Differential Revision: D82197859 fbshipit-source-id: e76e29754188ff15c7b4ebde8060c04f89aa3b52 --- .../react-native/Libraries/Image/RCTImageBlurUtils.mm | 3 ++- packages/react-native/Libraries/Image/RCTImageUtils.mm | 3 ++- .../Libraries/NativeAnimation/RCTAnimationUtils.mm | 10 ++++++++-- .../ComponentViews/ScrollView/RCTEnhancedScrollView.mm | 3 ++- packages/react-native/React/Views/RCTBorderDrawing.m | 4 +++- .../React/Views/ScrollView/RCTScrollView.m | 3 ++- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/packages/react-native/Libraries/Image/RCTImageBlurUtils.mm b/packages/react-native/Libraries/Image/RCTImageBlurUtils.mm index df9fa1d9a14..f0395f3ed59 100644 --- a/packages/react-native/Libraries/Image/RCTImageBlurUtils.mm +++ b/packages/react-native/Libraries/Image/RCTImageBlurUtils.mm @@ -30,7 +30,8 @@ UIImage *RCTBlurredImageWithRadius(UIImage *inputImage, CGFloat radius) }].CGImage; } - vImage_Buffer buffer1, buffer2; + vImage_Buffer buffer1; + vImage_Buffer buffer2; buffer1.width = buffer2.width = CGImageGetWidth(imageRef); buffer1.height = buffer2.height = CGImageGetHeight(imageRef); buffer1.rowBytes = buffer2.rowBytes = CGImageGetBytesPerRow(imageRef); diff --git a/packages/react-native/Libraries/Image/RCTImageUtils.mm b/packages/react-native/Libraries/Image/RCTImageUtils.mm index af0d12d5d17..bac55d05c68 100644 --- a/packages/react-native/Libraries/Image/RCTImageUtils.mm +++ b/packages/react-native/Libraries/Image/RCTImageUtils.mm @@ -212,7 +212,8 @@ BOOL RCTUpscalingRequired( sourceSize.height *= scale; // Calculate aspect ratios if needed (don't bother if resizeMode == stretch) - CGFloat aspect = 0.0, targetAspect = 0.0; + CGFloat aspect = 0.0; + CGFloat targetAspect = 0.0; if (resizeMode != RCTResizeModeStretch) { aspect = sourceSize.width / sourceSize.height; targetAspect = destSize.width / destSize.height; diff --git a/packages/react-native/Libraries/NativeAnimation/RCTAnimationUtils.mm b/packages/react-native/Libraries/NativeAnimation/RCTAnimationUtils.mm index 90cfe304d6f..e75e65296f3 100644 --- a/packages/react-native/Libraries/NativeAnimation/RCTAnimationUtils.mm +++ b/packages/react-native/Libraries/NativeAnimation/RCTAnimationUtils.mm @@ -90,9 +90,15 @@ uint32_t RCTInterpolateColorInRange(CGFloat value, NSArray *inputRan CGFloat inputMin = inputRange[rangeIndex].doubleValue; CGFloat inputMax = inputRange[rangeIndex + 1].doubleValue; - CGFloat redMin, greenMin, blueMin, alphaMin; + CGFloat redMin; + CGFloat greenMin; + CGFloat blueMin; + CGFloat alphaMin; [outputRange[rangeIndex] getRed:&redMin green:&greenMin blue:&blueMin alpha:&alphaMin]; - CGFloat redMax, greenMax, blueMax, alphaMax; + CGFloat redMax; + CGFloat greenMax; + CGFloat blueMax; + CGFloat alphaMax; [outputRange[rangeIndex + 1] getRed:&redMax green:&greenMax blue:&blueMax alpha:&alphaMax]; return RCTColorFromComponents( diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm index c593d9ee215..57204298af4 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm @@ -81,7 +81,8 @@ return; } - CGFloat top = 0, left = 0; + CGFloat top = 0; + CGFloat left = 0; if (contentSize.width < boundsSize.width) { left = (boundsSize.width - contentSize.width) * 0.5f; } diff --git a/packages/react-native/React/Views/RCTBorderDrawing.m b/packages/react-native/React/Views/RCTBorderDrawing.m index da99e0c58f4..0b83bcb4e65 100644 --- a/packages/react-native/React/Views/RCTBorderDrawing.m +++ b/packages/react-native/React/Views/RCTBorderDrawing.m @@ -80,7 +80,9 @@ static void RCTPathAddEllipticArc( CGFloat endAngle, BOOL clockwise) { - CGFloat xScale = 1, yScale = 1, radius = 0; + CGFloat xScale = 1; + CGFloat yScale = 1; + CGFloat radius = 0; if (size.width != 0) { xScale = 1; yScale = size.height / size.width; diff --git a/packages/react-native/React/Views/ScrollView/RCTScrollView.m b/packages/react-native/React/Views/ScrollView/RCTScrollView.m index f31e452e93c..0f566a54ecb 100644 --- a/packages/react-native/React/Views/ScrollView/RCTScrollView.m +++ b/packages/react-native/React/Views/ScrollView/RCTScrollView.m @@ -679,7 +679,8 @@ RCT_SCROLL_EVENT_HANDLER(scrollViewDidScrollToTop, onScrollToTop) return; } - CGFloat top = 0, left = 0; + CGFloat top = 0; + CGFloat left = 0; if (contentSize.width < boundsSize.width) { left = (boundsSize.width - contentSize.width) * 0.5f; }