From 07b90336b354b08c09ac3ab0ddf46dc6ff6f64ce Mon Sep 17 00:00:00 2001 From: exterlulz Date: Fri, 20 Aug 2010 16:52:34 +0200 Subject: [PATCH] add warnings to the project --- English.lproj/MainMenu.xib | 47 ++++++++++++-------------------------- kokogems.xcodeproj/project.pbxproj | 45 ++++++++++++++++++++++++++++++++++++ src/GameController.h | 4 ++-- src/GameController.m | 4 ++-- src/ScoreBubble.m | 5 ++-- 5 files changed, 66 insertions(+), 39 deletions(-) diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index 7ccd2f1..e58af98 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -11,8 +11,8 @@ 788 - + com.apple.InterfaceBuilder.CocoaPlugin @@ -812,14 +812,6 @@ 209 - - timerView - - - - 210 - - startNewGame: @@ -1155,6 +1147,14 @@ 292 + + + timerView + + + + 307 + @@ -1686,9 +1686,9 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{524, 32}, {384, 512}} + {{667, 52}, {384, 512}} com.apple.InterfaceBuilder.CocoaPlugin - {{524, 32}, {384, 512}} + {{667, 52}, {384, 512}} @@ -1790,7 +1790,7 @@ - 306 + 307 @@ -1905,7 +1905,7 @@ NSMenuItem NSTextField NSMenuItem - MyTimerView + TimerView NSButton NSMenuItem @@ -2052,7 +2052,7 @@ timerView - MyTimerView + TimerView toughGameButton @@ -2107,25 +2107,6 @@ - MyTimerView - NSView - - target - id - - - target - - target - id - - - - IBUserSource - - - - TimerView NSView diff --git a/kokogems.xcodeproj/project.pbxproj b/kokogems.xcodeproj/project.pbxproj index 4ff1170..f2fae5a 100644 --- a/kokogems.xcodeproj/project.pbxproj +++ b/kokogems.xcodeproj/project.pbxproj @@ -357,10 +357,32 @@ C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + GCC_WARN_ABOUT_GLOBAL_CONSTRUCTORS = YES; + GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = NO; + GCC_WARN_PEDANTIC = YES; + GCC_WARN_PROTOTYPE_CONVERSION = NO; + GCC_WARN_SHADOW = YES; + GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_STRICT_SELECTOR_MATCH = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_LABEL = YES; + GCC_WARN_UNUSED_PARAMETER = YES; + GCC_WARN_UNUSED_VALUE = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; @@ -371,9 +393,32 @@ C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + GCC_WARN_ABOUT_GLOBAL_CONSTRUCTORS = YES; + GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = NO; + GCC_WARN_PEDANTIC = YES; + GCC_WARN_PROTOTYPE_CONVERSION = NO; + 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_PARAMETER = YES; + GCC_WARN_UNUSED_VALUE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; SDKROOT = macosx10.6; diff --git a/src/GameController.h b/src/GameController.h index 63f6c21..b819627 100644 --- a/src/GameController.h +++ b/src/GameController.h @@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define TIMER_INTERVAL 0.04 -@class Game, GameView, MyTimerView; +@class Game, GameView, TimerView; @interface GameController : NSObject { @@ -57,7 +57,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. IBOutlet NSMenuItem *abortGameMenuItem, *pauseGameMenuItem, *muteMenuItem; IBOutlet NSMenuItem *freePlayMenuItem, *showHighScoresMenuItem, *resetHighScoresMenuItem; IBOutlet NSTextField *scoreTextField, *bonusTextField; - IBOutlet MyTimerView *timerView; + IBOutlet TimerView *timerView; IBOutlet NSWindow *gameWindow; IBOutlet NSPanel *hiScorePanel; IBOutlet NSTextField *hiScorePanelScoreTextField, *hiScorePanelNameTextField; diff --git a/src/GameController.m b/src/GameController.m index 0d74bd3..a91d916 100644 --- a/src/GameController.m +++ b/src/GameController.m @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ----====----====----====----====----====----====----====----====----====---- */ #import "GameController.h" -#import "MyTimerView.h" +#import "TimerView.h" #import "Game.h" #import "GameView.h" #import "Gem.h" @@ -582,7 +582,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. if (freePlay) [timerView setDecrement:0];// FREEPLAY } -- (void)startAnimation:(SEL)andThenSelector; +- (void)startAnimation:(SEL)andThenSelector { [animationTimerLock lock]; // diff --git a/src/ScoreBubble.m b/src/ScoreBubble.m index b63fea7..f3ba07b 100644 --- a/src/ScoreBubble.m +++ b/src/ScoreBubble.m @@ -36,11 +36,12 @@ NSMutableDictionary *stringAttributes; return [[[[self class] alloc] initWithValue:val At:loc Duration:count] autorelease]; } --(id)initWithValue:(int)val At:(NSPoint)loc Duration:(int)count; +-(id)initWithValue:(int)val At:(NSPoint)loc Duration:(int)count { NSString *str= [NSString stringWithFormat:@"%d", val]; NSSize strsize; - if (self=[super init]) { + self = [super init]; + if (self != nil) { if (!stringAttributes) { stringAttributes= [NSMutableDictionary dictionaryWithObjectsAndKeys:[NSFont fontWithName:@"ArialNarrow-Bold" size:18], NSFontAttributeName, [NSColor blackColor], NSForegroundColorAttributeName, NULL]; -- 2.11.4.GIT