mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Address some RN build warnings
Summary: Addresses build warnings for some additional compiler flags. Changelog: [Internal] Reviewed By: nlutsenko Differential Revision: D34299822 fbshipit-source-id: d3d873fb600990a869cb0e6fbe9fff4ebc8c5d0e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c1db41f060
commit
16feabf676
@@ -36,6 +36,7 @@ RCTCXXBRIDGE_PUBLIC_HEADERS = {
|
||||
"JSCExecutorFactory.h",
|
||||
"NSDataBigString.h",
|
||||
"RCTCxxBridgeDelegate.h",
|
||||
"RCTJSIExecutorRuntimeInstaller.h",
|
||||
"RCTMessageThread.h",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ void RCTEnableImageLoadingPerfInstrumentation(BOOL enabled)
|
||||
|
||||
static NSInteger RCTImageBytesForImage(UIImage *image)
|
||||
{
|
||||
NSInteger singleImageBytes = image.size.width * image.size.height * image.scale * image.scale * 4;
|
||||
NSInteger singleImageBytes = (NSInteger)(image.size.width * image.size.height * image.scale * image.scale * 4);
|
||||
return image.images ? image.images.count * singleImageBytes : singleImageBytes;
|
||||
}
|
||||
|
||||
@@ -614,7 +614,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
||||
});
|
||||
|
||||
return [[RCTImageURLLoaderRequest alloc] initWithRequestId:requestId imageURL:request.URL cancellationBlock:^{
|
||||
BOOL alreadyCancelled = atomic_fetch_or(cancelled.get(), 1);
|
||||
BOOL alreadyCancelled = atomic_fetch_or(cancelled.get(), 1) ? YES : NO;
|
||||
if (alreadyCancelled) {
|
||||
return;
|
||||
}
|
||||
@@ -754,7 +754,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
||||
__block dispatch_block_t cancelLoad = nil;
|
||||
__block NSLock *cancelLoadLock = [NSLock new];
|
||||
dispatch_block_t cancellationBlock = ^{
|
||||
BOOL alreadyCancelled = atomic_fetch_or(cancelled.get(), 1);
|
||||
BOOL alreadyCancelled = atomic_fetch_or(cancelled.get(), 1) ? YES : NO;
|
||||
if (alreadyCancelled) {
|
||||
return;
|
||||
}
|
||||
@@ -904,7 +904,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
|
||||
} else {
|
||||
dispatch_block_t decodeBlock = ^{
|
||||
// Calculate the size, in bytes, that the decompressed image will require
|
||||
NSInteger decodedImageBytes = (size.width * scale) * (size.height * scale) * 4;
|
||||
NSInteger decodedImageBytes = (NSInteger)((size.width * scale) * (size.height * scale) * 4);
|
||||
|
||||
// Mark these bytes as in-use
|
||||
self->_activeBytes += decodedImageBytes;
|
||||
|
||||
@@ -76,7 +76,7 @@ RCT_ENUM_CONVERTER(UIBackgroundFetchResult, (@{
|
||||
|
||||
@end
|
||||
#else
|
||||
@interface RCTPushNotificationManager () <NativePushNotificationManagerIOS>
|
||||
@interface RCTPushNotificationManager () <NativePushNotificationManagerIOSSpec>
|
||||
@end
|
||||
#endif // TARGET_OS_UIKITFORMAC
|
||||
|
||||
|
||||
@@ -481,7 +481,7 @@
|
||||
@"Only waiting for `RCTSurfaceStageSurfaceDidInitialRendering`, `RCTSurfaceStageSurfaceDidInitialLayout` and `RCTSurfaceStageSurfaceDidInitialMounting` stages are supported.");
|
||||
}
|
||||
|
||||
BOOL timeoutOccurred = dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, timeout * NSEC_PER_SEC));
|
||||
auto timeoutOccurred = dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, timeout * NSEC_PER_SEC));
|
||||
|
||||
// Atomic equivalent of `_waitingForMountingStageOnMainQueue = NO;`.
|
||||
atomic_fetch_and(&_waitingForMountingStageOnMainQueue, 0);
|
||||
|
||||
Reference in New Issue
Block a user