diff --git a/Gravity.xcodeproj/project.pbxproj b/Gravity.xcodeproj/project.pbxproj
index 04c56b0..310f98c 100644
--- a/Gravity.xcodeproj/project.pbxproj
+++ b/Gravity.xcodeproj/project.pbxproj
@@ -517,7 +517,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = GDI;
- LastUpgradeCheck = 0500;
+ LastUpgradeCheck = 0610;
ORGANIZATIONNAME = "Grant Davis Interactive, LLC";
TargetAttributes = {
77DAEC6215790DE80035EFC5 = {
@@ -653,8 +653,10 @@
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -724,8 +726,10 @@
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -757,8 +761,10 @@
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
diff --git a/Gravity.xcodeproj/project.xcworkspace/xcshareddata/Gravity.xccheckout b/Gravity.xcodeproj/project.xcworkspace/xcshareddata/Gravity.xccheckout
index d5cd67a..16b7e04 100644
--- a/Gravity.xcodeproj/project.xcworkspace/xcshareddata/Gravity.xccheckout
+++ b/Gravity.xcodeproj/project.xcworkspace/xcshareddata/Gravity.xccheckout
@@ -10,29 +10,29 @@
Gravity
IDESourceControlProjectOriginsDictionary
- B54EFC69-7B97-441E-8547-FF4643B0EBB4
- ssh://github.com/gdavis/Gravity.git
+ 1109C243DE63CF4106F76093EDB23CBFBCB6B992
+ https://github.com/dwieringa/Gravity.git
IDESourceControlProjectPath
- Gravity/Gravity.xcodeproj/project.xcworkspace
+ Gravity.xcodeproj
IDESourceControlProjectRelativeInstallPathDictionary
- B54EFC69-7B97-441E-8547-FF4643B0EBB4
- ../../..
+ 1109C243DE63CF4106F76093EDB23CBFBCB6B992
+ ../..
IDESourceControlProjectURL
- ssh://github.com/gdavis/Gravity.git
+ https://github.com/dwieringa/Gravity.git
IDESourceControlProjectVersion
- 110
+ 111
IDESourceControlProjectWCCIdentifier
- B54EFC69-7B97-441E-8547-FF4643B0EBB4
+ 1109C243DE63CF4106F76093EDB23CBFBCB6B992
IDESourceControlProjectWCConfigurations
IDESourceControlRepositoryExtensionIdentifierKey
public.vcs.git
IDESourceControlWCCIdentifierKey
- B54EFC69-7B97-441E-8547-FF4643B0EBB4
+ 1109C243DE63CF4106F76093EDB23CBFBCB6B992
IDESourceControlWCCName
Gravity
diff --git a/Gravity.xcodeproj/xcshareddata/xcschemes/Gravity.xcscheme b/Gravity.xcodeproj/xcshareddata/xcschemes/Gravity.xcscheme
index 7a38a3e..c76722e 100644
--- a/Gravity.xcodeproj/xcshareddata/xcschemes/Gravity.xcscheme
+++ b/Gravity.xcodeproj/xcshareddata/xcschemes/Gravity.xcscheme
@@ -1,6 +1,6 @@
+
+
+
+
10) {
mobileNumber = [mobileNumber substringFromIndex: length-10];
}
return mobileNumber;
}
-
+//TODO: Why doesn't getLength return a NSUInteger?
+ (int)getLength:(NSString*)mobileNumber
{
mobileNumber = [mobileNumber stringByReplacingOccurrencesOfString:@"(" withString:@""];
@@ -109,7 +109,7 @@ + (int)getLength:(NSString*)mobileNumber
mobileNumber = [mobileNumber stringByReplacingOccurrencesOfString:@"-" withString:@""];
mobileNumber = [mobileNumber stringByReplacingOccurrencesOfString:@"+" withString:@""];
- int length = [mobileNumber length];
+ int length = (int)[mobileNumber length];
return length;
}
diff --git a/Gravity/NSData+GDIAdditions.m b/Gravity/NSData+GDIAdditions.m
index e44edbd..558d81e 100644
--- a/Gravity/NSData+GDIAdditions.m
+++ b/Gravity/NSData+GDIAdditions.m
@@ -18,7 +18,7 @@ - (NSString *)MD5
unsigned char md5Buffer[CC_MD5_DIGEST_LENGTH];
// Create 16 byte MD5 hash value, store in buffer
- CC_MD5(self.bytes, self.length, md5Buffer);
+ CC_MD5(self.bytes, (CC_LONG)self.length, md5Buffer);
// Convert unsigned char buffer to NSString of hex values
NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
@@ -32,8 +32,8 @@ - (NSData *)gzipInflate
{
if ([self length] == 0) return self;
- unsigned full_length = [self length];
- unsigned half_length = [self length] / 2;
+ NSUInteger full_length = [self length];
+ NSUInteger half_length = [self length] / 2;
NSMutableData *decompressed = [NSMutableData dataWithLength: full_length + half_length];
BOOL done = NO;
@@ -41,7 +41,8 @@ - (NSData *)gzipInflate
z_stream strm;
strm.next_in = (Bytef *)[self bytes];
- strm.avail_in = [self length];
+ //TODO: rather than blindly cast length down to smaller size, consider throwing error if too large?
+ strm.avail_in = (uInt)[self length];
strm.total_out = 0;
strm.zalloc = Z_NULL;
strm.zfree = Z_NULL;
@@ -53,7 +54,7 @@ - (NSData *)gzipInflate
if (strm.total_out >= [decompressed length])
[decompressed increaseLengthBy: half_length];
strm.next_out = [decompressed mutableBytes] + strm.total_out;
- strm.avail_out = [decompressed length] - strm.total_out;
+ strm.avail_out = (uInt)([decompressed length] - strm.total_out);
// Inflate another chunk.
status = inflate (&strm, Z_SYNC_FLUSH);
@@ -82,7 +83,7 @@ - (NSData *)gzipDeflate
strm.opaque = Z_NULL;
strm.total_out = 0;
strm.next_in=(Bytef *)[self bytes];
- strm.avail_in = [self length];
+ strm.avail_in = (uInt)[self length];
// Compresssion Levels:
// Z_NO_COMPRESSION
@@ -100,7 +101,7 @@ - (NSData *)gzipDeflate
[compressed increaseLengthBy: 16384];
strm.next_out = [compressed mutableBytes] + strm.total_out;
- strm.avail_out = [compressed length] - strm.total_out;
+ strm.avail_out = (uInt)([compressed length] - strm.total_out);
deflate(&strm, Z_FINISH);
diff --git a/Gravity/NSString+GDIAdditions.m b/Gravity/NSString+GDIAdditions.m
index ab746e3..993f1ee 100644
--- a/Gravity/NSString+GDIAdditions.m
+++ b/Gravity/NSString+GDIAdditions.m
@@ -78,7 +78,7 @@ - (NSString*)MD5
unsigned char md5Buffer[CC_MD5_DIGEST_LENGTH];
// Create 16 byte MD5 hash value, store in buffer
- CC_MD5(ptr, strlen(ptr), md5Buffer);
+ CC_MD5(ptr, (CC_LONG)strlen(ptr), md5Buffer);
// Convert MD5 value in the buffer to NSString of hex values
NSMutableString *output = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
diff --git a/Gravity/UIFont+GDIAdditions.m b/Gravity/UIFont+GDIAdditions.m
index bed0f4e..708af55 100644
--- a/Gravity/UIFont+GDIAdditions.m
+++ b/Gravity/UIFont+GDIAdditions.m
@@ -15,7 +15,7 @@ + (void)logInstalledFonts
NSArray *fonts = [UIFont familyNames];
for (NSString *familyName in fonts) {
NSArray *fontNamesInFamily = [UIFont fontNamesForFamilyName:familyName];
- NSLog(@"%@ Family (%i)", familyName, fontNamesInFamily.count);
+ NSLog(@"%@ Family (%lu)", familyName, (unsigned long)fontNamesInFamily.count);
for (NSString *fontName in fontNamesInFamily) {
NSLog(@"\t - %@", fontName);
}