From fbcdba4f01db0cfd644fd5514860775074136f67 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Sat, 7 Jun 2008 10:53:00 -0700 Subject: [PATCH] Fixes several warnings --- NSBundle+SUAdditions.h | 2 ++ NSBundle+SUAdditions.m | 4 ++++ NSFileManager+Authentication.m | 3 ++- relaunch.m | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NSBundle+SUAdditions.h b/NSBundle+SUAdditions.h index 38fc9238..ed2475c4 100644 --- a/NSBundle+SUAdditions.h +++ b/NSBundle+SUAdditions.h @@ -9,6 +9,8 @@ #ifndef NSBUNDLE_PLUS_ADDITIONS_H #define NSBUNDLE_PLUS_ADDITIONS_H +#import + @interface NSBundle (SUAdditions) /*! @method diff --git a/NSBundle+SUAdditions.m b/NSBundle+SUAdditions.m index 948e5d55..983d0f5c 100644 --- a/NSBundle+SUAdditions.m +++ b/NSBundle+SUAdditions.m @@ -9,6 +9,10 @@ #import "Sparkle.h" #import "NSBundle+SUAdditions.h" +#ifndef NSAppKitVersionNumber10_4 +#define NSAppKitVersionNumber10_4 824 +#endif + @implementation NSBundle (SUAdditions) - (NSString *)name diff --git a/NSFileManager+Authentication.m b/NSFileManager+Authentication.m index 2c5d784b..01fc681d 100644 --- a/NSFileManager+Authentication.m +++ b/NSFileManager+Authentication.m @@ -82,7 +82,8 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza if ((bundle = [NSBundle bundleWithPath:path])) { // We'll clean it up a little for safety. - NSMutableCharacterSet *validCharacters = [NSMutableCharacterSet alphanumericCharacterSet]; + // The cast is necessary because of a bug in the headers in pre-10.5 SDKs + NSMutableCharacterSet *validCharacters = (id)[NSMutableCharacterSet alphanumericCharacterSet]; [validCharacters formUnionWithCharacterSet:[NSCharacterSet characterSetWithCharactersInString:@".-()"]]; postFix = [[bundle objectForInfoDictionaryKey:@"CFBundleVersion"] stringByTrimmingCharactersInSet:[validCharacters invertedSet]]; } diff --git a/relaunch.m b/relaunch.m index be65c539..6d7a5416 100644 --- a/relaunch.m +++ b/relaunch.m @@ -1,6 +1,8 @@ #import +#include + @interface TerminationListener : NSObject { const char *executablePath;