diff options
author | rowanbeentje <rowan@beent.je> | 2011-03-08 01:08:32 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-03-08 01:08:32 +0000 |
commit | 2a9b0987450a7dd60e824a9067c8aa8fd3d1ee5c (patch) | |
tree | bc4d83fe70582142fea71fd2465da88ebe725fb4 /Source/SPSQLExporter.m | |
parent | cd06fc0c9c3713f12394a02f148158b4422b4aed (diff) | |
download | sequelpro-2a9b0987450a7dd60e824a9067c8aa8fd3d1ee5c.tar.gz sequelpro-2a9b0987450a7dd60e824a9067c8aa8fd3d1ee5c.tar.bz2 sequelpro-2a9b0987450a7dd60e824a9067c8aa8fd3d1ee5c.zip |
Fix more compiler warnings, including a few bugs
Diffstat (limited to 'Source/SPSQLExporter.m')
-rw-r--r-- | Source/SPSQLExporter.m | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m index f6760468..3dfed305 100644 --- a/Source/SPSQLExporter.m +++ b/Source/SPSQLExporter.m @@ -29,6 +29,7 @@ #import "SPTablesList.h" #import "SPFileHandle.h" #import "SPExportUtilities.h" +#import "SPExportFile.h" #import "SPTableData.h" @interface SPSQLExporter (PrivateAPI) @@ -294,7 +295,7 @@ if ([connection queryErrored] || ![rowArray count]) { [errors appendFormat:@"%@\n", [connection getLastErrorMessage]]; - [[self exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"# Error: %@\n\n\n", [connection getLastErrorMessage]] dataUsingEncoding:NSUTF8StringEncoding]]; + [[self exportOutputFile] writeData:[[NSString stringWithFormat:@"# Error: %@\n\n\n", [connection getLastErrorMessage]] dataUsingEncoding:NSUTF8StringEncoding]]; continue; } @@ -329,7 +330,7 @@ // Inform the delegate that we are about to start writing the data to disk [delegate performSelectorOnMainThread:@selector(sqlExportProcessWillBeginWritingData:) withObject:self waitUntilDone:NO]; - while (row = [streamingResult fetchNextRowAsArray]) + while ((row = [streamingResult fetchNextRowAsArray])) { // Check for cancellation flag if ([self isCancelled]) { @@ -348,7 +349,7 @@ [sqlString setString:@""]; // Update the progress - NSUInteger progress = (j * ([self exportMaxProgress] / rowCount)); + NSUInteger progress = (NSUInteger)(j * ([self exportMaxProgress] / rowCount)); if (progress > lastProgressValue) { [self setExportProgressValue:progress]; @@ -773,7 +774,7 @@ */ - (NSString *)_createViewPlaceholderSyntaxForView:(NSString *)viewName { - NSInteger i, j; + NSUInteger i, j; NSMutableString *placeholderSyntax; // Get structured information for the view via the SPTableData parsers |