mirror of
https://github.com/status-im/react-native.git
synced 2025-02-26 08:05:34 +00:00
Fix some linter warnings
Reviewed By: majak Differential Revision: D3930059 fbshipit-source-id: dbbf67f287c46535f9c5947cd7ac101c5c91615e
This commit is contained in:
parent
30989dd24a
commit
339531065f
@ -47,7 +47,13 @@
|
||||
return _canLoadImageURLHandler(requestURL);
|
||||
}
|
||||
|
||||
- (RCTImageLoaderCancellationBlock)loadImageForURL:(NSURL *)imageURL size:(CGSize)size scale:(CGFloat)scale resizeMode:(RCTResizeMode)resizeMode progressHandler:(RCTImageLoaderProgressBlock)progressHandler partialLoadHandler:(RCTImageLoaderPartialLoadBlock)partialLoadHandler completionHandler:(RCTImageLoaderCompletionBlock)completionHandler
|
||||
- (RCTImageLoaderCancellationBlock)loadImageForURL:(NSURL *)imageURL
|
||||
size:(CGSize)size
|
||||
scale:(CGFloat)scale
|
||||
resizeMode:(RCTResizeMode)resizeMode
|
||||
progressHandler:(RCTImageLoaderProgressBlock)progressHandler
|
||||
partialLoadHandler:(__unused RCTImageLoaderPartialLoadBlock)partialLoadHandler
|
||||
completionHandler:(RCTImageLoaderCompletionBlock)completionHandler
|
||||
{
|
||||
return _loadImageURLHandler(imageURL, size, scale, resizeMode, progressHandler, completionHandler);
|
||||
}
|
||||
|
@ -941,8 +941,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
|
||||
#if RCT_PROFILE
|
||||
if (RCT_DEV && callID != -1 && self->_flowIDMap != NULL && RCTProfileIsProfiling()) {
|
||||
[self.flowIDMapLock lock];
|
||||
int64_t newFlowID = (int64_t)CFDictionaryGetValue(self->_flowIDMap, (const void *)(self->_flowID + index));
|
||||
_RCTProfileEndFlowEvent(@(newFlowID));
|
||||
NSUInteger newFlowID = (NSUInteger)CFDictionaryGetValue(self->_flowIDMap, (const void *)(self->_flowID + index));
|
||||
_RCTProfileEndFlowEvent(newFlowID);
|
||||
CFDictionaryRemoveValue(self->_flowIDMap, (const void *)(self->_flowID + index));
|
||||
[self.flowIDMapLock unlock];
|
||||
}
|
||||
@ -996,13 +996,13 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR
|
||||
RCTModuleData *moduleData = _moduleDataByID[moduleID];
|
||||
if (RCT_DEBUG && !moduleData) {
|
||||
RCTLogError(@"No module found for id '%zd'", moduleID);
|
||||
return NO;
|
||||
return nil;
|
||||
}
|
||||
|
||||
id<RCTBridgeMethod> method = moduleData.methods[methodID];
|
||||
if (RCT_DEBUG && !method) {
|
||||
RCTLogError(@"Unknown methodID: %zd for module: %zd (%@)", methodID, moduleID, moduleData.name);
|
||||
return NO;
|
||||
return nil;
|
||||
}
|
||||
|
||||
@try {
|
||||
|
@ -397,7 +397,7 @@ static NSThread *newJavaScriptThread(void)
|
||||
context[@"nativeTraceEndAsyncFlow"] = ^(__unused uint64_t tag, __unused NSString *name, int64_t cookie) {
|
||||
if (RCTProfileIsProfiling()) {
|
||||
[weakBridge.flowIDMapLock lock];
|
||||
NSUInteger newCookie = (int64_t)CFDictionaryGetValue(weakBridge.flowIDMap, (const void *)cookie);
|
||||
NSUInteger newCookie = (NSUInteger)CFDictionaryGetValue(weakBridge.flowIDMap, (const void *)cookie);
|
||||
_RCTProfileEndFlowEvent(newCookie);
|
||||
CFDictionaryRemoveValue(weakBridge.flowIDMap, (const void *)cookie);
|
||||
[weakBridge.flowIDMapLock unlock];
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <dlfcn.h>
|
||||
|
||||
|
||||
void __attribute__((visibility("hidden"),weak)) RCTCustomJSCInit(void *handle) {
|
||||
void __attribute__((visibility("hidden"),weak)) RCTCustomJSCInit(__unused void *handle) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -677,12 +677,12 @@ NSUInteger _RCTProfileBeginFlowEvent(void)
|
||||
{
|
||||
static NSUInteger flowID = 0;
|
||||
|
||||
CHECK(@0);
|
||||
CHECK(0);
|
||||
|
||||
NSUInteger cookie = ++flowID;
|
||||
if (callbacks != NULL) {
|
||||
callbacks->begin_async_flow(1, "flow", cookie);
|
||||
return @(cookie);
|
||||
callbacks->begin_async_flow(1, "flow", (int)cookie);
|
||||
return cookie;
|
||||
}
|
||||
|
||||
NSTimeInterval time = CACurrentMediaTime();
|
||||
@ -708,7 +708,7 @@ void _RCTProfileEndFlowEvent(NSUInteger cookie)
|
||||
CHECK();
|
||||
|
||||
if (callbacks != NULL) {
|
||||
callbacks->end_async_flow(1, "flow", cookie);
|
||||
callbacks->end_async_flow(1, "flow", (int)cookie);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user