Skip to content

Commit 97df0b4

Browse files
authored
Merge pull request #747 from macdoum1/master
Fix Xcode 9 strict prototype warnings
2 parents f1bfef4 + 3be6cb9 commit 97df0b4

19 files changed

+34
-34
lines changed

AWSCognito/Internal/AWSCognitoSQLiteManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ - (BOOL)putDatasetMetadata:(NSArray *)datasets error:(NSError **)error {
445445

446446
- (AWSCognitoRecord *)getRecordById_internal:(NSString *)recordId datasetName:(NSString *)datasetName error:(NSError * __autoreleasing *)error sync:(BOOL) sync{
447447
__block AWSCognitoRecord *record = nil;
448-
void (^getRecord)() = ^{
448+
void (^getRecord)(void) = ^{
449449
NSString *query = [NSString stringWithFormat:@"SELECT %@, %@, %@, %@, %@, %@ FROM %@ WHERE %@ = ? AND %@ = ? AND %@ = ?",
450450
AWSCognitoLastModifiedFieldName,
451451
AWSCognitoModifiedByFieldName,

AWSCognitoIdentityProvider/AWSCognitoIdentityUser.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ - (BOOL) isFirstCustomStepSRP: (AWSCognitoIdentityCustomChallengeDetails *) cust
700700

701701

702702
//Determine whether the error (if any) on the initiateAuth is a device not found error and if so forget the device and retry
703-
- (AWSTask<AWSCognitoIdentityProviderInitiateAuthResponse*>*) forgetDeviceOnInitiateDeviceNotFoundError:(AWSTask<AWSCognitoIdentityProviderInitiateAuthResponse*> * _Nonnull) task retryContinuation: (AWSTask<AWSCognitoIdentityProviderInitiateAuthResponse*>* (^_Nonnull)()) retryContinuation {
703+
- (AWSTask<AWSCognitoIdentityProviderInitiateAuthResponse*>*) forgetDeviceOnInitiateDeviceNotFoundError:(AWSTask<AWSCognitoIdentityProviderInitiateAuthResponse*> * _Nonnull) task retryContinuation: (AWSTask<AWSCognitoIdentityProviderInitiateAuthResponse*>* (^_Nonnull)(void)) retryContinuation {
704704
if([self isDeviceNotFoundError:task.error]){
705705
[self forgetDeviceInternal];
706706
return retryContinuation();
@@ -709,7 +709,7 @@ - (BOOL) isFirstCustomStepSRP: (AWSCognitoIdentityCustomChallengeDetails *) cust
709709
}
710710

711711
//Determine whether the error (if any) on the respondToAuthChallenge is a device not found error and if so forget the device and retry
712-
- (AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*>*) forgetDeviceOnRespondDeviceNotFoundError:(AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*> * _Nonnull) task retryContinuation: (AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*>* (^_Nonnull)()) retryContinuation {
712+
- (AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*>*) forgetDeviceOnRespondDeviceNotFoundError:(AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*> * _Nonnull) task retryContinuation: (AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*>* (^_Nonnull)(void)) retryContinuation {
713713
if([self isDeviceNotFoundError:task.error]){
714714
[self forgetDeviceInternal];
715715
return retryContinuation();

AWSCognitoIdentityProvider/Internal/NSData+AWSCognitoIdentityProvider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
2626
+ (NSData*) aws_dataWithSignedBigInteger:(AWSJKBigInteger *)bigInteger;
2727
+ (NSData*) aws_dataFromHexString:(NSString*)hexString;
2828
- (AWSJKBigInteger *)aws_toBigInt;
29-
void awsbigint_loadBigInt();
29+
void awsbigint_loadBigInt(void);
3030
@end
3131

3232
NS_ASSUME_NONNULL_END

AWSCore/Bolts/AWSCancellationToken.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
1717
/*!
1818
A block that will be called when a token is cancelled.
1919
*/
20-
typedef void(^AWSCancellationBlock)();
20+
typedef void(^AWSCancellationBlock)(void);
2121

2222
/*!
2323
The consumer view of a CancellationToken.

AWSCore/Bolts/AWSExecutor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN
3737
Returns a new executor that uses the given block to execute continuations.
3838
@param block The block to use.
3939
*/
40-
+ (instancetype)executorWithBlock:(void(^)(void(^block)()))block;
40+
+ (instancetype)executorWithBlock:(void(^)(void(^block)(void)))block;
4141

4242
/*!
4343
Returns a new executor that runs continuations on the given queue.
@@ -55,7 +55,7 @@ NS_ASSUME_NONNULL_BEGIN
5555
Runs the given block using this executor's particular strategy.
5656
@param block The block to execute.
5757
*/
58-
- (void)execute:(void(^)())block;
58+
- (void)execute:(void(^)(void))block;
5959

6060
@end
6161

AWSCore/Bolts/AWSExecutor.m

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
@interface AWSExecutor ()
4141

42-
@property (nonatomic, copy) void(^block)(void(^block)());
42+
@property (nonatomic, copy) void(^block)(void(^block)(void));
4343

4444
@end
4545

@@ -51,7 +51,7 @@ + (instancetype)defaultExecutor {
5151
static AWSExecutor *defaultExecutor = NULL;
5252
static dispatch_once_t onceToken;
5353
dispatch_once(&onceToken, ^{
54-
defaultExecutor = [self executorWithBlock:^void(void(^block)()) {
54+
defaultExecutor = [self executorWithBlock:^void(void(^block)(void)) {
5555
// We prefer to run everything possible immediately, so that there is callstack information
5656
// when debugging. However, we don't want the stack to get too deep, so if the remaining stack space
5757
// is less than 10% of the total space, we dispatch to another GCD queue.
@@ -74,7 +74,7 @@ + (instancetype)immediateExecutor {
7474
static AWSExecutor *immediateExecutor = NULL;
7575
static dispatch_once_t onceToken;
7676
dispatch_once(&onceToken, ^{
77-
immediateExecutor = [self executorWithBlock:^void(void(^block)()) {
77+
immediateExecutor = [self executorWithBlock:^void(void(^block)(void)) {
7878
block();
7979
}];
8080
});
@@ -85,7 +85,7 @@ + (instancetype)mainThreadExecutor {
8585
static AWSExecutor *mainThreadExecutor = NULL;
8686
static dispatch_once_t onceToken;
8787
dispatch_once(&onceToken, ^{
88-
mainThreadExecutor = [self executorWithBlock:^void(void(^block)()) {
88+
mainThreadExecutor = [self executorWithBlock:^void(void(^block)(void)) {
8989
if (![NSThread isMainThread]) {
9090
dispatch_async(dispatch_get_main_queue(), block);
9191
} else {
@@ -98,25 +98,25 @@ + (instancetype)mainThreadExecutor {
9898
return mainThreadExecutor;
9999
}
100100

101-
+ (instancetype)executorWithBlock:(void(^)(void(^block)()))block {
101+
+ (instancetype)executorWithBlock:(void(^)(void(^block)(void)))block {
102102
return [[self alloc] initWithBlock:block];
103103
}
104104

105105
+ (instancetype)executorWithDispatchQueue:(dispatch_queue_t)queue {
106-
return [self executorWithBlock:^void(void(^block)()) {
106+
return [self executorWithBlock:^void(void(^block)(void)) {
107107
dispatch_async(queue, block);
108108
}];
109109
}
110110

111111
+ (instancetype)executorWithOperationQueue:(NSOperationQueue *)queue {
112-
return [self executorWithBlock:^void(void(^block)()) {
112+
return [self executorWithBlock:^void(void(^block)(void)) {
113113
[queue addOperation:[NSBlockOperation blockOperationWithBlock:block]];
114114
}];
115115
}
116116

117117
#pragma mark - Initializer
118118

119-
- (instancetype)initWithBlock:(void(^)(void(^block)()))block {
119+
- (instancetype)initWithBlock:(void(^)(void(^block)(void)))block {
120120
self = [super init];
121121
if (!self) return self;
122122

@@ -127,7 +127,7 @@ - (instancetype)initWithBlock:(void(^)(void(^block)()))block {
127127

128128
#pragma mark - Execution
129129

130-
- (void)execute:(void(^)())block {
130+
- (void)execute:(void(^)(void))block {
131131
self.block(block);
132132
}
133133

AWSCore/Bolts/AWSTask.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ typedef __nullable id(^AWSContinuationBlock)(AWSTask<ResultType> *t);
111111
If block returns a AWSTask, then the task returned from
112112
this method will not be completed until that task is completed.
113113
*/
114-
+ (instancetype)taskFromExecutor:(AWSExecutor *)executor withBlock:(nullable id (^)())block;
114+
+ (instancetype)taskFromExecutor:(AWSExecutor *)executor withBlock:(nullable id (^)(void))block;
115115

116116
// Properties that will be set on the task once it is completed.
117117

AWSCore/Bolts/AWSTask.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ + (instancetype)taskForCompletionOfAnyTask:(nullable NSArray<AWSTask *> *)tasks
223223
return tcs.task;
224224
}
225225

226-
+ (instancetype)taskFromExecutor:(AWSExecutor *)executor withBlock:(nullable id (^)())block {
226+
+ (instancetype)taskFromExecutor:(AWSExecutor *)executor withBlock:(nullable id (^)(void))block {
227227
return [[self taskWithResult:nil] continueWithExecutor:executor withBlock:^id(AWSTask *task) {
228228
return block();
229229
}];
@@ -303,7 +303,7 @@ - (void)runContinuations {
303303
[self.condition lock];
304304
[self.condition broadcast];
305305
[self.condition unlock];
306-
for (void (^callback)() in self.callbacks) {
306+
for (void (^callback)(void) in self.callbacks) {
307307
callback();
308308
}
309309
[self.callbacks removeAllObjects];

AWSCore/GZIP/AWSGZIP.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
#import <Foundation/Foundation.h>
3535

36-
void awsgzip_loadGZIP();
36+
void awsgzip_loadGZIP(void);
3737

3838
@interface NSData (AWSGZIP)
3939

AWSCore/Logging/AWSDDFileLogger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ extern unsigned long long const kAWSDDDefaultLogFilesDiskQuota;
397397
* You can optionally force the current log file to be rolled with this method.
398398
* CompletionBlock will be called on main queue.
399399
*/
400-
- (void)rollLogFileWithCompletionBlock:(void (^)())completionBlock NS_SWIFT_NAME(rollLogFile(withCompletion:));
400+
- (void)rollLogFileWithCompletionBlock:(void (^)(void))completionBlock NS_SWIFT_NAME(rollLogFile(withCompletion:));
401401

402402
/**
403403
* Method is deprecated.

0 commit comments

Comments
 (0)