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 f1a3649..d9a875a 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 4454565..61910a6 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 72f0084..606529d 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 369d7f7..d5d401d 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 f48c694..3f1997c 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 551eb0f..0e25847 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 1c254a7..4b60ba8 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 7282093..cc0419f 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 93b181f..df3535b 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 3f453ff..c124618 100644 (file)
@@ -12,6 +12,6 @@
 
 @interface TargetConfig : Target
 
-@property (weak) Config *config;
+@property (nonatomic, weak) Config *config;
 
 @end
index a4766e1..551bb8d 100644 (file)
@@ -10,6 +10,6 @@
 
 @interface TargetKeyboard : Target
 
-@property (assign) CGKeyCode vk;
+@property (nonatomic, assign) CGKeyCode vk;
 
 @end
index 2b3f836..2597b2d 100644 (file)
@@ -9,6 +9,6 @@
 
 @interface TargetMouseBtn : Target
 
-@property (assign) CGMouseButton button;
+@property (nonatomic, assign) CGMouseButton button;
 
 @end
index 90e74d0..e91b569 100644 (file)
@@ -9,6 +9,6 @@
 
 @interface TargetMouseMove : Target
 
-@property (assign) int axis;
+@property (nonatomic, assign) int axis;
 
 @end
index f82ca01..d261659 100644 (file)
@@ -9,6 +9,6 @@
 
 @interface TargetMouseScroll : Target
 
-@property (assign) int amount;
+@property (nonatomic, assign) int amount;
 
 @end