mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
Increased warning levels to -Wall -Wextra, and fixed Xcode 7 beta issues
Summary: @public I've increased the warning levels in the OSS frameworks, which caught a bunch of minor issues. I also fixed some new errors in Xcode 7 relating to designated initializers and TLS security. Test Plan: * Test the sample apps and make sure they still work. * Run tests.
This commit is contained in:
@@ -40,12 +40,11 @@
|
||||
|
||||
- (instancetype)initWithBridge:(RCTBridge *)bridge
|
||||
{
|
||||
RCTAssertParam(bridge);
|
||||
|
||||
if ((self = [super initWithTarget:nil action:NULL])) {
|
||||
|
||||
RCTAssert(bridge != nil, @"Expect an event dispatcher");
|
||||
|
||||
_bridge = bridge;
|
||||
|
||||
_nativeTouches = [[NSMutableOrderedSet alloc] init];
|
||||
_reactTouches = [[NSMutableArray alloc] init];
|
||||
_touchViews = [[NSMutableArray alloc] init];
|
||||
@@ -58,6 +57,8 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
RCT_NOT_IMPLEMENTED(-initWithTarget:(id)target action:(SEL)action)
|
||||
|
||||
typedef NS_ENUM(NSInteger, RCTTouchEventType) {
|
||||
RCTTouchEventTypeStart,
|
||||
RCTTouchEventTypeMove,
|
||||
@@ -163,7 +164,7 @@ RCT_IMPORT_METHOD(RCTEventEmitter, receiveTouches);
|
||||
*/
|
||||
- (void)_updateAndDispatchTouches:(NSSet *)touches
|
||||
eventName:(NSString *)eventName
|
||||
originatingTime:(CFTimeInterval)originatingTime
|
||||
originatingTime:(__unused CFTimeInterval)originatingTime
|
||||
{
|
||||
// Update touches
|
||||
NSMutableArray *changedIndexes = [[NSMutableArray alloc] init];
|
||||
@@ -269,12 +270,12 @@ static BOOL RCTAnyTouchesChanged(NSSet *touches)
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)canPreventGestureRecognizer:(UIGestureRecognizer *)preventedGestureRecognizer
|
||||
- (BOOL)canPreventGestureRecognizer:(__unused UIGestureRecognizer *)preventedGestureRecognizer
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)canBePreventedByGestureRecognizer:(UIGestureRecognizer *)preventingGestureRecognizer
|
||||
- (BOOL)canBePreventedByGestureRecognizer:(__unused UIGestureRecognizer *)preventingGestureRecognizer
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user