From 4422810afa93d3cbce76812cc50e45ef8634180b Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 2 Mar 2011 02:25:08 +0000 Subject: - Fix compiler warnings for MCPKit - largely typecast related - Fix further compiler warnings, including a couple of bugs - Disable the -wselector warnings (Multiple definition types for selector) as they're currently unsupported in LLVM - Disable the -wconversion warnings (Prototype conversion) warnings as we usually can't affect protocol declaration - Disable the -wstrict-selector-match (Strict selector matching) due to too many false positives --- Frameworks/MCPKit/MCPFoundationKit/MCPResultPlus.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Frameworks/MCPKit/MCPFoundationKit/MCPResultPlus.m') diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPResultPlus.m b/Frameworks/MCPKit/MCPFoundationKit/MCPResultPlus.m index c171dc7f..dbf9d070 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPResultPlus.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPResultPlus.m @@ -42,7 +42,7 @@ */ - (NSArray *)fetchColAtIndex:(NSUInteger)col { - NSMutableArray *theCol = [NSMutableArray arrayWithCapacity:[self numOfRows]]; + NSMutableArray *theCol = [NSMutableArray arrayWithCapacity:(NSUInteger)[self numOfRows]]; MYSQL_ROW_OFFSET thePosition; NSArray *theRow; @@ -61,7 +61,7 @@ [self dataSeek:0]; // One might want to have optimized code here. Maybe in later versions - while (theRow = [self fetchRowAsType:MCPTypeArray]) + while ((theRow = [self fetchRowAsType:MCPTypeArray])) { [theCol addObject:[theRow objectAtIndex:col]]; } @@ -131,9 +131,9 @@ switch (type) { case MCPTypeArray : - theTable = [NSMutableArray arrayWithCapacity:[self numOfRows]]; + theTable = [NSMutableArray arrayWithCapacity:(NSUInteger)[self numOfRows]]; - while (theVect = [self fetchRowAsArray]) + while ((theVect = [self fetchRowAsArray])) { [theTable addObject:theVect]; } @@ -141,9 +141,9 @@ theTable = [NSArray arrayWithArray:theTable]; break; case MCPTypeDictionary : - theTable = [NSMutableArray arrayWithCapacity:[self numOfRows]]; + theTable = [NSMutableArray arrayWithCapacity:(NSUInteger)[self numOfRows]]; - while (theVect = [self fetchRowAsDictionary]) + while ((theVect = [self fetchRowAsDictionary])) { [theTable addObject:theVect]; } @@ -175,7 +175,7 @@ theTable = [NSDictionary dictionaryWithDictionary:theTable]; break; default : - NSLog (@"Unknown MCPReturnType : %ld; return nil\n", (NSInteger)type); + NSLog (@"Unknown MCPReturnType : %d; return nil\n", (int)type); theTable = nil; break; } -- cgit v1.2.3