Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B Bolts-ObjC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 34
    • Issues 34
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • BoltsFramework
  • Bolts-ObjC
  • Merge requests
  • !81
An error occurred while fetching the assigned milestone of the selected merge_request.

Enable more pedantic warnings and fix them.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge nlutsenko.warnings into master 10 years ago
  • Overview 3
  • Commits 3
  • Pipelines 0
  • Changes 8

Created by: ghost

cc @grantland

Compare
  • master (base)

and
  • latest version
    1d5d6f68
    3 commits, 2 years ago

8 files
+ 215
- 190

    Preferences

    File browser
    Compare changes
Bo‎lts‎
Com‎mon‎
BFExec‎utor.m‎ +4 -2
BFTa‎sk.h‎ +3 -3
BFTa‎sk.m‎ +8 -8
BFTaskComple‎tionSource.m‎ +4 -0
i‎OS‎
BFAppLinkReturnToR‎efererController.m‎ +5 -4
Bolts.x‎codeproj‎
project‎.pbxproj‎ +22 -4
Bolts‎Tests‎
AppLink‎Tests.m‎ +134 -134
TaskT‎ests.m‎ +35 -35
Bolts/Common/BFExecutor.m
+ 4
- 2
  • View file @ 1d5d6f68

  • Edit in single-file editor

  • Open in Web IDE


@@ -11,7 +11,9 @@
#import "BFExecutor.h"
@interface BFExecutor ()
@property (copy) void(^block)(void(^block)());
@property (nonatomic, copy) void(^block)(void(^block)());
@end
@implementation BFExecutor
@@ -25,7 +27,7 @@
defaultExecutor = [BFExecutor executorWithBlock:^void(void(^block)()) {
static const NSString *kBFTaskDepthKey = @"BFTaskDepth";
static const int kBFTaskDefaultExecutorMaxDepth = 20;
// We prefer to run everything possible immediately, so that there is callstack information
// when debugging. However, we don't want the stack to get too deep, so if the number of
// recursive calls to this method exceeds a certain depth, we dispatch to another GCD queue.
Bolts/Common/BFTask.h
+ 3
- 3
  • View file @ 1d5d6f68

  • Edit in single-file editor

  • Open in Web IDE


@@ -56,7 +56,7 @@ typedef id(^BFContinuationBlock)(BFTask *task);
+ (instancetype)taskForCompletionOfAllTasks:(NSArray *)tasks;
/*!
Returns a task that will be completed once all of the input tasks have completed.
Returns a task that will be completed once all of the input tasks have completed.
If all tasks complete successfully without being faulted or cancelled the result will be
an `NSArray` of all task results in the order they were provided.
@param tasks An `NSArray` of the tasks to use as an input.
@@ -139,7 +139,7 @@ typedef id(^BFContinuationBlock)(BFTask *task);
this method will not be completed until that task is completed.
*/
- (instancetype)continueWithExecutor:(BFExecutor *)executor
withBlock:(BFContinuationBlock)block;
withBlock:(BFContinuationBlock)block;
/*!
Identical to continueWithBlock:, except that the block is only run
@@ -166,7 +166,7 @@ typedef id(^BFContinuationBlock)(BFTask *task);
this method will not be completed until that task is completed.
*/
- (instancetype)continueWithExecutor:(BFExecutor *)executor
withSuccessBlock:(BFContinuationBlock)block;
withSuccessBlock:(BFContinuationBlock)block;
/*!
Waits until this operation is completed.
Bolts/Common/BFTask.m
+ 8
- 8
  • View file @ 1d5d6f68

  • Edit in single-file editor

  • Open in Web IDE


@@ -384,22 +384,22 @@ __attribute__ ((noinline)) void warnBlockingOperationOnMainThread() {
BOOL isCompleted;
BOOL isCancelled;
BOOL isFaulted;
@synchronized (self.lock) {
isCompleted = self.completed;
isCancelled = self.cancelled;
isFaulted = self.faulted;
}
// Description string includes status information and, if available, the
// result sisnce in some ways this is what a promise actually "is".
return [NSString stringWithFormat:@"<%@: %p; completed = %@; cancelled = %@; faulted = %@;%@>",
NSStringFromClass([self class]),
self,
isCompleted ? @"YES" : @"NO",
isCancelled ? @"YES" : @"NO",
isFaulted ? @"YES" : @"NO",
isCompleted ? [NSString stringWithFormat:@" result:%@", _result] : @""];
NSStringFromClass([self class]),
self,
isCompleted ? @"YES" : @"NO",
isCancelled ? @"YES" : @"NO",
isFaulted ? @"YES" : @"NO",
isCompleted ? [NSString stringWithFormat:@" result:%@", _result] : @""];
}
@end
Bolts/Common/BFTaskCompletionSource.m
+ 4
- 0
  • View file @ 1d5d6f68

  • Edit in single-file editor

  • Open in Web IDE


@@ -13,10 +13,13 @@
#import "BFTask.h"
@interface BFTaskCompletionSource ()
@property (nonatomic, retain, readwrite) BFTask *task;
@end
@interface BFTask (BFTaskCompletionSource)
- (void)setResult:(id)result;
- (void)setError:(NSError *)error;
- (void)setException:(NSException *)exception;
@@ -25,6 +28,7 @@
- (BOOL)trySetError:(NSError *)error;
- (BOOL)trySetException:(NSException *)exception;
- (BOOL)trySetCancelled;
@end
@implementation BFTaskCompletionSource
Bolts/iOS/BFAppLinkReturnToRefererController.m
+ 5
- 4
  • View file @ 1d5d6f68

  • Edit in single-file editor

  • Open in Web IDE


@@ -236,15 +236,16 @@ static const CFTimeInterval kBFViewAnimationDuration = 0.25f;
- (void)openRefererAppLink:(BFAppLink *)refererAppLink {
if (refererAppLink) {
if ([_delegate respondsToSelector:@selector(returnToRefererController:willNavigateToAppLink:)]) {
[_delegate returnToRefererController:self willNavigateToAppLink:refererAppLink];
id<BFAppLinkReturnToRefererControllerDelegate> delegate = _delegate;
if ([delegate respondsToSelector:@selector(returnToRefererController:willNavigateToAppLink:)]) {
[delegate returnToRefererController:self willNavigateToAppLink:refererAppLink];
}
NSError *error = nil;
BFAppLinkNavigationType type = [BFAppLinkNavigation navigateToAppLink:refererAppLink error:&error];
if ([_delegate respondsToSelector:@selector(returnToRefererController:didNavigateToAppLink:type:)]) {
[_delegate returnToRefererController:self didNavigateToAppLink:refererAppLink type:type];
if ([delegate respondsToSelector:@selector(returnToRefererController:didNavigateToAppLink:type:)]) {
[delegate returnToRefererController:self didNavigateToAppLink:refererAppLink type:type];
}
}
}
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: nlutsenko.warnings

Menu

Explore Projects Groups Snippets