From 9e1e52f31223856d5e9530d1e732b9a8a6054269 Mon Sep 17 00:00:00 2001 From: Rob Hogan Date: Fri, 13 Jan 2017 12:30:29 -0800 Subject: [PATCH] Mark __unused completion block args Summary: Catching a couple more build warnings introduced by https://github.com/facebook/react-native/commit/b50f55026a83dd0f933b2bf8da698764a4641688 since https://github.com/facebook/react-native/pull/11797. Edit: and one more introduced by https://github.com/facebook/react-native/commit/c68a70862168cd3df751c5110a0062493397dc9d Tested the build with UIExplorer. Closes https://github.com/facebook/react-native/pull/11865 Differential Revision: D4415630 fbshipit-source-id: 1384d56770eea8665ede8bd9abe06cf34cd14b33 --- React/Base/RCTTouchHandler.m | 2 +- React/Modules/JSCSamplingProfiler.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/React/Base/RCTTouchHandler.m b/React/Base/RCTTouchHandler.m index 81431f9d3..5198fb104 100644 --- a/React/Base/RCTTouchHandler.m +++ b/React/Base/RCTTouchHandler.m @@ -345,7 +345,7 @@ static BOOL RCTAnyTouchesChanged(NSSet *touches) #pragma mark - UIGestureRecognizerDelegate -- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRequireFailureOfGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer +- (BOOL)gestureRecognizer:(__unused UIGestureRecognizer *)gestureRecognizer shouldRequireFailureOfGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { // Same condition for `failure of` as for `be prevented by`. return [self canBePreventedByGestureRecognizer:otherGestureRecognizer]; diff --git a/React/Modules/JSCSamplingProfiler.m b/React/Modules/JSCSamplingProfiler.m index b205539c1..bce69416e 100644 --- a/React/Modules/JSCSamplingProfiler.m +++ b/React/Modules/JSCSamplingProfiler.m @@ -37,7 +37,7 @@ RCT_EXPORT_METHOD(operationComplete:(__unused int)token result:(id)profileData e // Send the request NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; - NSURLSessionDataTask *sessionDataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *sessionError) { + NSURLSessionDataTask *sessionDataTask = [session dataTaskWithRequest:request completionHandler:^(__unused NSData *data, __unused NSURLResponse *response, NSError *sessionError) { if (sessionError) { RCTLogWarn(@"JS CPU Profile data failed to send. Is the packager server running locally?\nDetails: %@", error); } else {