diff options
author | rowanbeentje <rowan@beent.je> | 2011-03-14 01:26:57 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-03-14 01:26:57 +0000 |
commit | f63d1de5460968e5466be02676c8c6f9ed8787b6 (patch) | |
tree | c66735047936114febbddcb0a963d43cfd868db5 /Source/SPUserManager.m | |
parent | 52eb2680673fca634013fa45ef16f4173a33c880 (diff) | |
download | sequelpro-f63d1de5460968e5466be02676c8c6f9ed8787b6.tar.gz sequelpro-f63d1de5460968e5466be02676c8c6f9ed8787b6.tar.bz2 sequelpro-f63d1de5460968e5466be02676c8c6f9ed8787b6.zip |
- Fix more warnings
Diffstat (limited to 'Source/SPUserManager.m')
-rw-r--r-- | Source/SPUserManager.m | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m index 5a673389..565cfc6f 100644 --- a/Source/SPUserManager.m +++ b/Source/SPUserManager.m @@ -29,6 +29,7 @@ #import "SPConnectionController.h" #import "SPServerSupport.h" #import "SPAlertSheets.h" +#import <BWToolkitFramework/BWAnchoredButtonBar.h> static const NSString *SPTableViewNameColumnID = @"NameColumn"; @@ -146,11 +147,11 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; // Select users from the mysql.user table MCPResult *result = [self.mySqlConnection queryString:@"SELECT * FROM mysql.user ORDER BY user"]; - NSInteger rows = [result numOfRows]; + NSUInteger rows = (NSUInteger)[result numOfRows]; if (rows > 0) [result dataSeek:0]; - for (NSInteger i = 0; i < rows; i++) + for (NSUInteger i = 0; i < rows; i++) { [resultAsArray addObject:[result fetchRowAsDictionary]]; } @@ -217,7 +218,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; { // Go through each item that contains a dictionary of key-value pairs // for each user currently in the database. - for (NSInteger i = 0; i < [items count]; i++) + for (NSUInteger i = 0; i < [items count]; i++) { NSString *username = [[items objectAtIndex:i] objectForKey:@"User"]; NSArray *parentResults = [[self _fetchUserWithUserName:username] retain]; @@ -312,7 +313,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; if ([results numOfRows]) [results dataSeek:0]; - for (NSInteger i = 0; i < [results numOfRows]; i++) + for (NSUInteger i = 0; i < [results numOfRows]; i++) { [schemas addObject:[results fetchRowAsDictionary]]; } @@ -383,7 +384,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; [queryResults dataSeek:0]; } - for (NSInteger i = 0; i < [queryResults numOfRows]; i++) + for (NSUInteger i = 0; i < [queryResults numOfRows]; i++) { NSDictionary *rowDict = [queryResults fetchRowAsDictionary]; NSManagedObject *dbPriv = [NSEntityDescription insertNewObjectForEntityForName:@"Privileges" @@ -844,7 +845,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; for (NSPersistentStore* store in stores) { NSError *error = nil; - [[self.managedObjectContext persistentStoreCoordinator] removePersistentStore:store error:error]; + [[self.managedObjectContext persistentStoreCoordinator] removePersistentStore:store error:&error]; } // Add a new store @@ -1209,7 +1210,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; MCPResult *result = [self.mySqlConnection queryString:statement]; - NSUInteger rows = [result numOfRows]; + NSUInteger rows = (NSUInteger)[result numOfRows]; BOOL userExists = YES; if (rows == 0) userExists = NO; @@ -1257,6 +1258,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; [self.mySqlConnection queryString:updateResourcesStatement]; [self _checkAndDisplayMySqlError]; } + return YES; } /** |