From: Joe Wreschnig Date: Fri, 1 Mar 2013 17:52:38 +0000 (+0100) Subject: More compiler warnings on. Make all properties nonatomic. X-Git-Tag: version-1.0~67 X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=commitdiff_plain;h=19f40be5b645e44ffb55bdce0b6cc5c5615f68e7 More compiler warnings on. Make all properties nonatomic. --- diff --git a/ApplicationController.h b/ApplicationController.h index f1a3649..d9a875a 100644 --- a/ApplicationController.h +++ b/ApplicationController.h @@ -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; diff --git a/ApplicationController.m b/ApplicationController.m index 4454565..61910a6 100644 --- a/ApplicationController.m +++ b/ApplicationController.m @@ -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; } diff --git a/Config.h b/Config.h index 72f0084..606529d 100644 --- 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; diff --git a/ConfigsController.h b/ConfigsController.h index 369d7f7..d5d401d 100644 --- a/ConfigsController.h +++ b/ConfigsController.h @@ -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; diff --git a/Enjoyable.xcodeproj/project.pbxproj b/Enjoyable.xcodeproj/project.pbxproj index f48c694..3f1997c 100644 --- a/Enjoyable.xcodeproj/project.pbxproj +++ b/Enjoyable.xcodeproj/project.pbxproj @@ -386,24 +386,34 @@ 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; @@ -415,23 +425,33 @@ 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; diff --git a/JSAction.h b/JSAction.h index 551eb0f..0e25847 100644 --- a/JSAction.h +++ b/JSAction.h @@ -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; diff --git a/Joystick.h b/Joystick.h index 1c254a7..4b60ba8 100644 --- a/Joystick.h +++ b/Joystick.h @@ -10,11 +10,11 @@ @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; diff --git a/JoystickController.h b/JoystickController.h index 7282093..cc0419f 100644 --- a/JoystickController.h +++ b/JoystickController.h @@ -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 diff --git a/Target.h b/Target.h index 93b181f..df3535b 100644 --- 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; diff --git a/TargetConfig.h b/TargetConfig.h index 3f453ff..c124618 100644 --- a/TargetConfig.h +++ b/TargetConfig.h @@ -12,6 +12,6 @@ @interface TargetConfig : Target -@property (weak) Config *config; +@property (nonatomic, weak) Config *config; @end diff --git a/TargetKeyboard.h b/TargetKeyboard.h index a4766e1..551bb8d 100644 --- a/TargetKeyboard.h +++ b/TargetKeyboard.h @@ -10,6 +10,6 @@ @interface TargetKeyboard : Target -@property (assign) CGKeyCode vk; +@property (nonatomic, assign) CGKeyCode vk; @end diff --git a/TargetMouseBtn.h b/TargetMouseBtn.h index 2b3f836..2597b2d 100644 --- a/TargetMouseBtn.h +++ b/TargetMouseBtn.h @@ -9,6 +9,6 @@ @interface TargetMouseBtn : Target -@property (assign) CGMouseButton button; +@property (nonatomic, assign) CGMouseButton button; @end diff --git a/TargetMouseMove.h b/TargetMouseMove.h index 90e74d0..e91b569 100644 --- a/TargetMouseMove.h +++ b/TargetMouseMove.h @@ -9,6 +9,6 @@ @interface TargetMouseMove : Target -@property (assign) int axis; +@property (nonatomic, assign) int axis; @end diff --git a/TargetMouseScroll.h b/TargetMouseScroll.h index f82ca01..d261659 100644 --- a/TargetMouseScroll.h +++ b/TargetMouseScroll.h @@ -9,6 +9,6 @@ @interface TargetMouseScroll : Target -@property (assign) int amount; +@property (nonatomic, assign) int amount; @end