Permalink
Browse files

Enabled additional compiler warnings.

-dDEBUG=1 for the Debug configuration.
Log kCGEventTapDisabledByTimeout and kCGEventTapDisabledByUserInput only in DEBUG builds.
  • Loading branch information...
1 parent 91ecc89 commit 6b0b5a093e386786e2c086e1620feb52c070cafd @correia committed Mar 10, 2011
Showing with 29 additions and 2 deletions.
  1. +2 −0 Resources/Info.plist
  2. +21 −0 Scrollvetica.xcodeproj/project.pbxproj
  3. +6 −2 Source/ScrollingInverterEventTap.m
View
@@ -26,6 +26,8 @@
<array/>
<key>CFBundleVersion</key>
<string>7</string>
+ <key>LSApplicationCategoryType</key>
+ <string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>LSUIElement</key>
@@ -264,7 +264,17 @@
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ "GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = "DEBUG=1";
+ GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
+ GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNKNOWN_PRAGMAS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
@@ -277,7 +287,18 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_PREPROCESSOR_DEFINITIONS = "";
+ "GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = "DEBUG=0";
+ GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
+ GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNKNOWN_PRAGMAS = YES;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = macosx;
@@ -88,13 +88,17 @@ - (CGEventRef)_eventTapCallbackWithProxy:(CGEventTapProxy)proxy type:(CGEventTyp
}
case kCGEventTapDisabledByTimeout: {
- NSLog(@"Got kCGEventTapDisabledByTimeout in %s", __func__);
+#if DEBUG
+ NSLog(@"Got kCGEventTapDisabledByTimeout in %s; re-enabling.", __func__);
+#endif
CGEventTapEnable(_eventTapMachPort, YES);
break;
}
case kCGEventTapDisabledByUserInput: {
- NSLog(@"Got kCGEventTapDisabledByUserInput in %s", __func__);
+#if DEBUG
+ NSLog(@"Got kCGEventTapDisabledByUserInput in %s; re-enabling.", __func__);
+#endif
CGEventTapEnable(_eventTapMachPort, YES);
break;
}

0 comments on commit 6b0b5a0

Please sign in to comment.