diff --git a/packages/react-native/Libraries/FBLazyVector/FBLazyVector/FBLazyVector.h b/packages/react-native/Libraries/FBLazyVector/FBLazyVector/FBLazyVector.h index 481398ee14ef57..46c2782bf9bd4f 100644 --- a/packages/react-native/Libraries/FBLazyVector/FBLazyVector/FBLazyVector.h +++ b/packages/react-native/Libraries/FBLazyVector/FBLazyVector/FBLazyVector.h @@ -50,8 +50,9 @@ class LazyVector { const_reference at(size_type pos) const { #ifndef _LIBCPP_NO_EXCEPTIONS - if (!(pos < _size)) + if (!(pos < _size)) { throw std::out_of_range("out of range"); + } #else assert(pos < _size || !"out of range"); #endif diff --git a/packages/react-native/Libraries/Image/RCTUIImageViewAnimated.mm b/packages/react-native/Libraries/Image/RCTUIImageViewAnimated.mm index 670493e83a9211..5478e5753d4b17 100644 --- a/packages/react-native/Libraries/Image/RCTUIImageViewAnimated.mm +++ b/packages/react-native/Libraries/Image/RCTUIImageViewAnimated.mm @@ -25,11 +25,13 @@ static NSUInteger RCTDeviceFreeMemory(void) kern_return_t kern; kern = host_page_size(host_port, &page_size); - if (kern != KERN_SUCCESS) + if (kern != KERN_SUCCESS) { return 0; + } kern = host_statistics(host_port, HOST_VM_INFO, (host_info_t)&vm_stat, &host_size); - if (kern != KERN_SUCCESS) + if (kern != KERN_SUCCESS) { return 0; + } return (vm_stat.free_count - vm_stat.speculative_count) * page_size; } @@ -278,8 +280,9 @@ - (void)displayDidRefresh:(CADisplayLink *)displayLink - (void)calculateMaxBufferCount { NSUInteger bytes = CGImageGetBytesPerRow(self.currentFrame.CGImage) * CGImageGetHeight(self.currentFrame.CGImage); - if (bytes == 0) + if (bytes == 0) { bytes = 1024; + } NSUInteger max = 0; if (self.maxBufferSize > 0) { diff --git a/packages/react-native/React/Views/RefreshControl/RCTRefreshControl.m b/packages/react-native/React/Views/RefreshControl/RCTRefreshControl.m index 53bfd04703502d..7f7e5471ec6e44 100644 --- a/packages/react-native/React/Views/RefreshControl/RCTRefreshControl.m +++ b/packages/react-native/React/Views/RefreshControl/RCTRefreshControl.m @@ -71,8 +71,9 @@ - (void)didMoveToWindow - (void)beginRefreshingProgrammatically { - if (!_hasMovedToWindow) + if (!_hasMovedToWindow) { return; + } UInt64 beginRefreshingTimestamp = _currentRefreshingStateTimestamp; _refreshingProgrammatically = YES; @@ -108,8 +109,9 @@ - (void)beginRefreshingProgrammatically - (void)endRefreshingProgrammatically { - if (!_hasMovedToWindow) + if (!_hasMovedToWindow) { return; + } // The contentOffset of the scrollview MUST be greater than the contentInset before calling // endRefreshing otherwise the next pull to refresh will not work properly. UIScrollView *scrollView = self.scrollView; diff --git a/packages/react-native/ReactCommon/cxxreact/tests/jsbigstring.cpp b/packages/react-native/ReactCommon/cxxreact/tests/jsbigstring.cpp index 6bb9dda3b46311..02890b11190489 100644 --- a/packages/react-native/ReactCommon/cxxreact/tests/jsbigstring.cpp +++ b/packages/react-native/ReactCommon/cxxreact/tests/jsbigstring.cpp @@ -16,8 +16,9 @@ using namespace facebook::react; namespace { int tempFileFromString(std::string contents) { const char* tmpDir = getenv("TMPDIR"); - if (tmpDir == nullptr) + if (tmpDir == nullptr) { tmpDir = "/tmp"; + } std::string tmp{tmpDir}; tmp += "/temp.XXXXXX";