aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCustomQuery.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-03-04 00:38:30 +0000
committerrowanbeentje <rowan@beent.je>2011-03-04 00:38:30 +0000
commit994756398decf77738afb3c599d4cb9238c77cee (patch)
tree6fef724448931d438e553d98096a8f20cbf6751b /Source/SPCustomQuery.m
parent6f983024a66ddb594eac5e4e808a8c3c51f6b6ff (diff)
downloadsequelpro-994756398decf77738afb3c599d4cb9238c77cee.tar.gz
sequelpro-994756398decf77738afb3c599d4cb9238c77cee.tar.bz2
sequelpro-994756398decf77738afb3c599d4cb9238c77cee.zip
- Fix more compiler warnings
Diffstat (limited to 'Source/SPCustomQuery.m')
-rw-r--r--Source/SPCustomQuery.m18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 3ee7dc4f..7005e690 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -633,7 +633,7 @@
}
// Record any affected rows
- if ( [mySQLConnection affectedRows] != -1 )
+ if ( [mySQLConnection affectedRows] >= 0 )
totalAffectedRows += [mySQLConnection affectedRows];
else if ( [streamingResult numOfRows] )
totalAffectedRows += [streamingResult numOfRows];
@@ -937,8 +937,8 @@
NSCharacterSet *whitespaceAndNewlineSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];
NSCharacterSet *whitespaceSet = [NSCharacterSet whitespaceCharacterSet];
- // If the supplied position is negative or beyond the end of the string, return nil.
- if (position < 0 || position > [[textView string] length])
+ // If the supplied position is beyond the end of the string, return nil.
+ if (position > [[textView string] length])
return NSMakeRange(NSNotFound, 0);
// Split the current text into ranges of queries
@@ -1054,8 +1054,8 @@
SPSQLParser *customQueryParser;
NSArray *queries;
- // If the supplied position is negative or beyond the end of the string, return nil.
- if (position < 0 || position > [[textView string] length])
+ // If the supplied position beyond the end of the string, return nil.
+ if (position > [[textView string] length])
return NSMakeRange(NSNotFound,0);
// Split the current text into ranges of queries
@@ -1314,7 +1314,7 @@
*/
- (void) initQueryLoadTimer
{
- if (queryLoadTimer) [self clearTableLoadTimer];
+ if (queryLoadTimer) [self clearQueryLoadTimer];
queryLoadInterfaceUpdateInterval = 1;
queryLoadLastRowCount = 0;
queryLoadTimerTicksSinceLastUpdate = 0;
@@ -1750,7 +1750,7 @@
[database backtickQuotedString], [tableForColumn backtickQuotedString]]];
[theResult setReturnDataAsStrings:YES];
if ([theResult numOfRows]) [theResult dataSeek:0];
- NSInteger i;
+ NSUInteger i;
for ( i = 0 ; i < [theResult numOfRows] ; i++ ) {
theRow = [theResult fetchRowAsDictionary];
if ( [[theRow objectForKey:@"Key"] isEqualToString:@"PRI"] ) {
@@ -2056,7 +2056,7 @@
// Remove all quoted strings as a temp string to match the correct clauses
NSRange matchedRange;
- NSInteger i;
+ NSUInteger i;
NSMutableString *tmpString = [NSMutableString stringWithString:queryString];
NSMutableString *qq = [NSMutableString string];
matchedRange = [tmpString rangeOfRegex:@"\"(?:[^\"\\\\]*+|\\\\.)*\""];
@@ -2333,7 +2333,7 @@
isFieldEditable = ([[editStatus objectAtIndex:0] integerValue] == 1) ? YES : NO;
NSString *fieldType = nil;
- NSUInteger *fieldLength = 0;
+ NSUInteger fieldLength = 0;
NSString *fieldEncoding = nil;
BOOL allowNULL = YES;