More compiler warnings on. Make all properties nonatomic.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Fri, 1 Mar 2013 17:52:38 +0000 (18:52 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Fri, 1 Mar 2013 17:52:38 +0000 (18:52 +0100)
14 files changed:
ApplicationController.h
ApplicationController.m
Config.h
ConfigsController.h
Enjoyable.xcodeproj/project.pbxproj
JSAction.h
Joystick.h
JoystickController.h
Target.h
TargetConfig.h
TargetKeyboard.h
TargetMouseBtn.h
TargetMouseMove.h
TargetMouseScroll.h

index f1a364979c8145b0800de70934854ae564728cff..d9a875abcce553541d235740d4edca01054de2bf 100644 (file)
@@ -18,9 +18,9 @@
     IBOutlet NSMenu *dockMenuBase;
 }
 
-@property (strong) IBOutlet JoystickController *jsController;
-@property (strong) IBOutlet TargetController *targetController;
-@property (strong) IBOutlet ConfigsController *configsController;
+@property (nonatomic, strong) IBOutlet JoystickController *jsController;
+@property (nonatomic, strong) IBOutlet TargetController *targetController;
+@property (nonatomic, strong) IBOutlet ConfigsController *configsController;
 
 - (IBAction)toggleActivity:(id)sender;
 - (void)configsChanged;
index 445456526329370a5b8f3f2fc9f6b66e65848003..61910a6e247ddd8280770715e8a607e83324c114 100644 (file)
@@ -75,7 +75,7 @@
     NSInteger firstConfig = [self firstConfigMenuIndex];
     Config *current = self.configsController.currentConfig;
     NSArray *configs = self.configsController.configs;
-    for (int i = 0; i < configs.count; ++i)
+    for (NSUInteger i = 0; i < configs.count; ++i)
         [dockMenuBase itemAtIndex:i + firstConfig].state = configs[i] == current;
 }
 
index 72f00844de29899ae28f51f20fb2e170af68d807..606529dc46d2c95d9580b54d11d435bb8be3eff6 100644 (file)
--- a/Config.h
+++ b/Config.h
@@ -11,8 +11,8 @@
 
 @interface Config : NSObject
 
-@property (copy) NSString *name;
-@property (readonly) NSMutableDictionary *entries;
+@property (nonatomic, copy) NSString *name;
+@property (nonatomic, readonly) NSMutableDictionary *entries;
 
 - (id)initWithName:(NSString *)name;
 - (Target *)objectForKeyedSubscript:(JSAction *)action;
index 369d7f7cbba8e9e6e9ed1c381ceb7c7f26e64eff..d5d401d4069ced4c23d950378ca34735d82a6a7b 100644 (file)
@@ -16,8 +16,8 @@
     IBOutlet NSButton *exportButton;
 }
 
-@property (readonly) Config *currentConfig;
-@property (readonly) NSArray *configs;
+@property (nonatomic, readonly) Config *currentConfig;
+@property (nonatomic, readonly) NSArray *configs;
 
 - (Config *)objectForKeyedSubscript:(NSString *)name;
 
index f48c694f95525dffa9d87036887b4e17eef53d4b..3f1997cb29ba013ca8e50d51dafe6202b4f0a7ca 100644 (file)
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+                               CLANG_ENABLE_OBJC_ARC = YES;
                                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                                CLANG_WARN_ENUM_CONVERSION = YES;
                                CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO;
                                CLANG_WARN_INT_CONVERSION = YES;
+                               CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+                               CLANG_WARN_OBJC_RECEIVER_WEAK = NO;
                                CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
                                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                                GCC_C_LANGUAGE_STANDARD = c99;
                                GCC_OPTIMIZATION_LEVEL = 0;
                                GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
+                               GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
+                               GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+                               GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
                                GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
                                GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+                               GCC_WARN_PEDANTIC = YES;
+                               GCC_WARN_SHADOW = YES;
+                               GCC_WARN_SIGN_COMPARE = YES;
                                GCC_WARN_STRICT_SELECTOR_MATCH = YES;
                                GCC_WARN_UNDECLARED_SELECTOR = YES;
                                GCC_WARN_UNINITIALIZED_AUTOS = YES;
                                GCC_WARN_UNUSED_FUNCTION = YES;
+                               GCC_WARN_UNUSED_LABEL = YES;
                                GCC_WARN_UNUSED_VARIABLE = YES;
                                MACOSX_DEPLOYMENT_TARGET = 10.7;
                                ONLY_ACTIVE_ARCH = YES;
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+                               CLANG_ENABLE_OBJC_ARC = YES;
                                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                                CLANG_WARN_ENUM_CONVERSION = YES;
                                CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO;
                                CLANG_WARN_INT_CONVERSION = YES;
+                               CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
+                               CLANG_WARN_OBJC_RECEIVER_WEAK = NO;
                                CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
                                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                                GCC_C_LANGUAGE_STANDARD = c99;
                                GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
+                               GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
+                               GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+                               GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
                                GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
                                GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
+                               GCC_WARN_PEDANTIC = YES;
+                               GCC_WARN_SHADOW = YES;
+                               GCC_WARN_SIGN_COMPARE = YES;
                                GCC_WARN_STRICT_SELECTOR_MATCH = YES;
                                GCC_WARN_UNDECLARED_SELECTOR = YES;
                                GCC_WARN_UNINITIALIZED_AUTOS = YES;
                                GCC_WARN_UNUSED_FUNCTION = YES;
+                               GCC_WARN_UNUSED_LABEL = YES;
                                GCC_WARN_UNUSED_VARIABLE = YES;
                                MACOSX_DEPLOYMENT_TARGET = 10.7;
                                SDKROOT = macosx;
index 551eb0ffe7c4774245f4849dde28cf75ecfd032a..0e2584726f52cffb7d0ddaa00f779c975d486f60 100644 (file)
@@ -8,12 +8,12 @@
 
 @interface JSAction : NSObject
 
-@property (assign) IOHIDElementCookie cookie;
-@property (copy) NSArray *children;
-@property (weak) id base;
-@property (copy) NSString *name;
-@property (assign) BOOL active;
-@property (readonly) float magnitude;
+@property (nonatomic, assign) IOHIDElementCookie cookie;
+@property (nonatomic, copy) NSArray *children;
+@property (nonatomic, weak) id base;
+@property (nonatomic, copy) NSString *name;
+@property (nonatomic, assign) BOOL active;
+@property (nonatomic, readonly) float magnitude;
 @property (readonly) NSString *uid;
 
 - (id)initWithName:(NSString *)newName base:(JSAction *)newBase;
index 1c254a75abb01112ef70ad0e1277e028c5b2d749..4b60ba84d75c563d14763f8d9cb9b32bd78ce7b1 100644 (file)
 
 @interface Joystick : NSObject
 
-@property (assign) int index;
-@property (copy) NSString *productName;
-@property (assign) IOHIDDeviceRef device;
-@property (copy) NSArray *children;
-@property (readonly) NSString *name;
+@property (nonatomic, assign) int index;
+@property (nonatomic, copy) NSString *productName;
+@property (nonatomic, assign) IOHIDDeviceRef device;
+@property (nonatomic, copy) NSArray *children;
+@property (nonatomic, readonly) NSString *name;
 @property (readonly) NSString *uid;
 
 - (id)initWithDevice:(IOHIDDeviceRef)device;
index 7282093ff87238ea85ca3113b9c65f1e9202fb70..cc0419fa833f48151970753029ccae3dc8b9c319 100644 (file)
@@ -20,9 +20,9 @@
 - (void)setup;
 - (Joystick *)findJoystickByRef:(IOHIDDeviceRef)device;
 
-@property (readonly) JSAction *selectedAction;
-@property (assign) NSPoint mouseLoc;
-@property (assign) BOOL frontWindowOnly;
-@property (assign) BOOL sendingRealEvents;
+@property (nonatomic, readonly) JSAction *selectedAction;
+@property (nonatomic, assign) NSPoint mouseLoc;
+@property (nonatomic, assign) BOOL frontWindowOnly;
+@property (nonatomic, assign) BOOL sendingRealEvents;
 
 @end
index 93b181f083acbc820e1496d0d4955485b2190057..df3535b7176b8c35973f008b5e6d07a4e536268f 100644 (file)
--- a/Target.h
+++ b/Target.h
@@ -10,9 +10,9 @@
 
 @interface Target : NSObject
 
-@property (assign) float magnitude;
-@property (assign) BOOL running;
-@property (readonly) BOOL isContinuous;
+@property (nonatomic, assign) float magnitude;
+@property (nonatomic, assign) BOOL running;
+@property (nonatomic, readonly) BOOL isContinuous;
 
 - (void)trigger;
 - (void)untrigger;
index 3f453ff73d6065a1aec3c4ac8837a0eddb36ae3f..c124618b79054f29114767236753211ec3f09fa5 100644 (file)
@@ -12,6 +12,6 @@
 
 @interface TargetConfig : Target
 
-@property (weak) Config *config;
+@property (nonatomic, weak) Config *config;
 
 @end
index a4766e152d914e17ac6ffafe113433e64fb42729..551bb8d45953f2322f964ef465a642368d9a75ca 100644 (file)
@@ -10,6 +10,6 @@
 
 @interface TargetKeyboard : Target
 
-@property (assign) CGKeyCode vk;
+@property (nonatomic, assign) CGKeyCode vk;
 
 @end
index 2b3f836b8934ca29ac0a9090a998c8284d42b04c..2597b2d596fb5e92576f2c182527226e540e28ba 100644 (file)
@@ -9,6 +9,6 @@
 
 @interface TargetMouseBtn : Target
 
-@property (assign) CGMouseButton button;
+@property (nonatomic, assign) CGMouseButton button;
 
 @end
index 90e74d0ce85e6c58502dca227c0c826ab301fc8c..e91b569ad1e57698a5a46ea5e97b225d2122f9ba 100644 (file)
@@ -9,6 +9,6 @@
 
 @interface TargetMouseMove : Target
 
-@property (assign) int axis;
+@property (nonatomic, assign) int axis;
 
 @end
index f82ca01cc55e200a4eaa9dddbf41666636092ce4..d261659cf9ed5a6bb7fda2576a6c87223756af79 100644 (file)
@@ -9,6 +9,6 @@
 
 @interface TargetMouseScroll : Target
 
-@property (assign) int amount;
+@property (nonatomic, assign) int amount;
 
 @end