Skip to content
Permalink
Browse files

Fixed xcode 9 warnings

  • Loading branch information...
valeriomazzeo committed Jun 11, 2018
1 parent 8802e73 commit f1849bea2db72307f34428cd3d842a6e34602086
@@ -1 +1 @@
2.4.1
2.4.2
@@ -1,6 +1,6 @@
osx_image: xcode8.3
osx_image: xcode9.3
language: objective-c
rvm: 2.4.1
rvm: 2.4.2
cache:
- bundler
- cocoapods
@@ -158,7 +158,7 @@ - (void)flush:(void (^)(void))completion
[_accessLock lock];
if (_accessCount == 0) {
[self _flushNow:^{
[_accessLock unlock];
[self->_accessLock unlock];
if (completion) completion();
}];
} else {
@@ -275,9 +275,9 @@ - (void)endAccessing
_accessCount -= 1;
if (_accessCount == 0 && _pendingFlushCompletionBlocks.count > 0) {
[self _flushNow:^{
NSArray *blocks = [_pendingFlushCompletionBlocks copy];
[_pendingFlushCompletionBlocks removeAllObjects];
[_accessLock unlock];
NSArray *blocks = [self->_pendingFlushCompletionBlocks copy];
[self->_pendingFlushCompletionBlocks removeAllObjects];
[self->_accessLock unlock];
for (dispatch_block_t block in blocks) {
block();
}
@@ -675,7 +675,7 @@ - (void)performMappingOnResponseWithCompletionBlock:(void(^)(RKMappingResult *ma
[[RKObjectRequestOperation responseMappingQueue] addOperation:self.responseMapperOperation];
}

- (BOOL)deleteTargetObject:(NSError **)error
- (BOOL)deleteTargetObject:(NSError * __autoreleasing *)error
{
__block BOOL _blockSuccess = YES;

@@ -124,7 +124,7 @@ extern NSString * const RKTestFactoryDefaultNamesManagedObjectStore;
@param factoryName The name to assign the factory.
@param block A block to execute when building an object instance for the factory name.
*/
+ (void)defineFactory:(NSString *)factoryName withBlock:(id (^)())block;
+ (void)defineFactory:(NSString *)factoryName withBlock:(id (^)(void))block;

/**
Creates and returns a new instance of an object using the factory with the given name.
@@ -204,12 +204,12 @@ extern NSString * const RKTestFactoryDefaultNamesManagedObjectStore;
/**
Sets a block to be executed when the `setUp` method is called as part of a test run.
*/
+ (void)setSetupBlock:(void (^)())block;
//+ (void)setSetupBlock:(void (^)(void))block;

/**
Sets a block to be executed when the `tearDown` method is called as part of a test run.
*/
+ (void)setTearDownBlock:(void (^)())block;
//+ (void)setTearDownBlock:(void (^)(void))block;

///--------------------------
/// @name Managing Test State
@@ -42,11 +42,11 @@ @interface RKTestFactory ()
@property (nonatomic, strong) NSURL *baseURL;
@property (nonatomic, strong) NSMutableDictionary *factoryBlocks;
@property (nonatomic, strong) NSMutableDictionary *sharedObjectsByFactoryName;
@property (nonatomic, copy) void (^setUpBlock)();
@property (nonatomic, copy) void (^tearDownBlock)();
@property (nonatomic, copy) void (^setUpBlock)(void);
@property (nonatomic, copy) void (^tearDownBlock)(void);

+ (RKTestFactory *)sharedFactory;
- (void)defineFactory:(NSString *)factoryName withBlock:(id (^)())block;
- (void)defineFactory:(NSString *)factoryName withBlock:(id (^)(void))block;
- (id)objectFromFactory:(NSString *)factoryName properties:(NSDictionary *)properties;
- (void)defineDefaultFactories;

@@ -83,14 +83,14 @@ - (instancetype)init
return self;
}

- (void)defineFactory:(NSString *)factoryName withBlock:(id (^)())block
- (void)defineFactory:(NSString *)factoryName withBlock:(id (^)(void))block
{
(self.factoryBlocks)[factoryName] = [block copy];
}

- (id)objectFromFactory:(NSString *)factoryName properties:(NSDictionary *)properties
{
id (^block)() = (self.factoryBlocks)[factoryName];
id (^block)(void) = (self.factoryBlocks)[factoryName];
NSAssert(block, @"No factory is defined with the name '%@'", factoryName);

id object = block();
@@ -158,7 +158,7 @@ + (void)setBaseURL:(NSURL *)URL
[RKTestFactory sharedFactory].baseURL = URL;
}

+ (void)defineFactory:(NSString *)factoryName withBlock:(id (^)())block
+ (void)defineFactory:(NSString *)factoryName withBlock:(id (^)(void))block
{
[[RKTestFactory sharedFactory] defineFactory:factoryName withBlock:block];
}
@@ -222,12 +222,12 @@ + (id)managedObjectStore
}
#endif

+ (void)setSetupBlock:(void (^)())block
+ (void)setSetupBlocvoidk:(void (^)(void))block
{
[RKTestFactory sharedFactory].setUpBlock = block;
}

+ (void)setTearDownBlock:(void (^)())block
+ (void)setTearDownBlocvoidk:(void (^)(void))block
{
[RKTestFactory sharedFactory].tearDownBlock = block;
}
@@ -84,7 +84,7 @@
@param notificationSender The object we are waiting to post the notification
@param block A block to invoke to trigger the notification activity
*/
+ (void)waitForNotificationWithName:(NSString *)name object:(id)notificationSender usingBlock:(void(^)())block;
+ (void)waitForNotificationWithName:(NSString *)name object:(id)notificationSender usingBlock:(void(^)(void))block;

/**
Configures a notification observer to wait for the a notification with the given name to be posted
@@ -93,6 +93,6 @@
@param name The name of the notification we are waiting for
@param block A block to invoke to trigger the notification activity
*/
+ (void)waitForNotificationWithName:(NSString *)name usingBlock:(void(^)())block;
+ (void)waitForNotificationWithName:(NSString *)name usingBlock:(void(^)(void))block;

@end
@@ -17,15 +17,15 @@ @interface RKTestNotificationObserver ()
@implementation RKTestNotificationObserver


+ (void)waitForNotificationWithName:(NSString *)name object:(id)object usingBlock:(void(^)())block
+ (void)waitForNotificationWithName:(NSString *)name object:(id)object usingBlock:(void(^)(void))block
{
RKTestNotificationObserver *observer = [RKTestNotificationObserver notificationObserverForName:name object:object];
[observer addObserver];
block();
[observer waitForNotification];
}

+ (void)waitForNotificationWithName:(NSString *)name usingBlock:(void(^)())block
+ (void)waitForNotificationWithName:(NSString *)name usingBlock:(void(^)(void))block
{
[self waitForNotificationWithName:name object:nil usingBlock:block];
}
@@ -160,7 +160,7 @@
25D6390B135184CE000879B1 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0700;
LastUpgradeCheck = 0940;
};
buildConfigurationList = 25D6390E135184CE000879B1 /* Build configuration list for PBXProject "RKMacOSX" */;
compatibilityVersion = "Xcode 3.2";
@@ -283,11 +283,21 @@
25D63933135184CF000879B1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -314,11 +324,21 @@
25D63934135184CF000879B1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -182,7 +182,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = RKS;
LastUpgradeCheck = 0700;
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = "Blake Watters";
};
buildConfigurationList = 259C7FF015D20B5600F447D2 /* Build configuration list for PBXProject "RKSearchExample" */;
@@ -304,20 +304,41 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
ONLY_ACTIVE_ARCH = YES;
@@ -331,12 +352,33 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
@@ -99,7 +99,7 @@
name = Products;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA = {
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
25063C9016021B16007CAC2B /* Default-568h@2x.png */,
@@ -192,7 +192,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0700;
LastUpgradeCheck = 0940;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "RKTwitter" */;
compatibilityVersion = "Xcode 3.2";
@@ -204,7 +204,7 @@
French,
German,
);
mainGroup = 29B97314FDCFA39411CA2CEA;
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */;
projectDirPath = "";
projectRoot = "";
@@ -335,9 +335,33 @@
isa = XCBuildConfiguration;
buildSettings = {
BUILD_STYLE = Debug;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -348,8 +372,32 @@
isa = XCBuildConfiguration;
buildSettings = {
BUILD_STYLE = Release;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "0940"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

0 comments on commit f1849be

Please sign in to comment.
You can’t perform that action at this time.