diff options
author | sqlprodev <sqlprodev@northofthree.com> | 2011-03-01 19:01:41 +0000 |
---|---|---|
committer | sqlprodev <sqlprodev@northofthree.com> | 2011-03-01 19:01:41 +0000 |
commit | 4ffd7b043ca505e52b7f1c5a463e02534997c197 (patch) | |
tree | a51f41c832ee7f0b2b425df4df655eb142356407 | |
parent | 6eaeee8d11028cc626bcef2dd8dd2ceaabafe2a2 (diff) | |
download | sequelpro-4ffd7b043ca505e52b7f1c5a463e02534997c197.tar.gz sequelpro-4ffd7b043ca505e52b7f1c5a463e02534997c197.tar.bz2 sequelpro-4ffd7b043ca505e52b7f1c5a463e02534997c197.zip |
fixed compiler warnings
-rw-r--r-- | Source/SPAppController.m | 4 | ||||
-rw-r--r-- | Source/SPAppleScriptSupport.m | 1 | ||||
-rw-r--r-- | Source/SPBundleEditorController.m | 5 | ||||
-rw-r--r-- | Source/SPBundleHTMLOutputController.m | 4 | ||||
-rw-r--r-- | Source/SPConnectionControllerDelegate.m | 1 | ||||
-rw-r--r-- | Source/SPCopyTable.m | 1 | ||||
-rw-r--r-- | Source/SPDataImport.m | 1 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.m | 2 | ||||
-rw-r--r-- | Source/SPEditSheetTextView.m | 3 | ||||
-rw-r--r-- | Source/SPEditorPreferencePane.m | 8 | ||||
-rw-r--r-- | Source/SPExportFileUtilities.m | 3 | ||||
-rw-r--r-- | Source/SPExportInitializer.m | 3 | ||||
-rw-r--r-- | Source/SPFavoritesPreferencePane.m | 2 | ||||
-rw-r--r-- | Source/SPNarrowDownCompletion.m | 4 | ||||
-rw-r--r-- | Source/SPOutlineView.m | 3 | ||||
-rw-r--r-- | Source/SPPreferencesUpgrade.m | 8 | ||||
-rw-r--r-- | Source/SPSSHTunnel.m | 2 | ||||
-rw-r--r-- | Source/SPServerSupport.m | 2 | ||||
-rw-r--r-- | Source/SPStringAdditions.m | 1 | ||||
-rw-r--r-- | Source/SPTableContent.m | 4 | ||||
-rw-r--r-- | Source/SPTableStructure.m | 1 | ||||
-rw-r--r-- | Source/SPTableStructureDelegate.m | 6 | ||||
-rw-r--r-- | Source/SPTablesList.m | 1 | ||||
-rw-r--r-- | Source/SPTextView.m | 2 |
24 files changed, 30 insertions, 42 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index b0f5693e..f7514928 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -1859,10 +1859,6 @@ YY_BUFFER_STATE yy_scan_string (const char *); NSLocalizedString(@"Data Table", @"data table menu item label"), NSLocalizedString(@"General", @"general menu item label"),nil]; - NSArray *scopeSelector = [NSArray arrayWithObjects:@"executeBundleItemForInputField:", - @"executeBundleItemForDataTable:", - @"executeBundleItemForApp:", nil]; - NSInteger k = 0; BOOL bundleOtherThanGeneralFound = NO; for(NSString* scope in scopes) { diff --git a/Source/SPAppleScriptSupport.m b/Source/SPAppleScriptSupport.m index ea390ab9..49206e0b 100644 --- a/Source/SPAppleScriptSupport.m +++ b/Source/SPAppleScriptSupport.m @@ -25,6 +25,7 @@ #import "SPAppleScriptSupport.h" #import "SPWindowController.h" +#import "SPAppController.h" @implementation SPAppController (SPAppleScriptSupport) diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m index 279002f4..8f1f6bab 100644 --- a/Source/SPBundleEditorController.m +++ b/Source/SPBundleEditorController.m @@ -480,7 +480,6 @@ } if(selectedTag != kDisabledScopeTag && ![[currentDict objectForKey:SPBundleFileScopeKey] isEqualToString:oldScope]) { - NSString *newScope = [currentDict objectForKey:SPBundleFileScopeKey]; NSUInteger newScopeIndex = [self _arrangedScopeIndexForScopeIndex:selectedTag]; NSString *currentCategory = [currentDict objectForKey:SPBundleFileCategoryKey]; if(!currentCategory) currentCategory = @""; @@ -578,7 +577,6 @@ - (IBAction)addCommandBundle:(id)sender { NSMutableDictionary *bundle; - NSUInteger insertIndex; // Store pending changes in Query [[self window] makeFirstResponder:nameTextField]; @@ -1015,7 +1013,6 @@ NSString *thePath = [NSString stringWithFormat:@"%@/%@.%@", bundlePath, bundleName, SPUserBundleFileExtension]; if([[NSFileManager defaultManager] fileExistsAtPath:thePath isDirectory:nil]) { NSError *error = nil; - NSString *trashDir = [NSHomeDirectory() stringByAppendingPathComponent:@".Trash"]; // Use a AppleScript script since NSWorkspace performFileOperation or NSFileManager moveItemAtPath // have problems probably due access rights. @@ -1148,8 +1145,6 @@ draggedFilePath = nil; } if(oldBundleName) [oldBundleName release], oldBundleName = nil; - - return YES; } #pragma mark - diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m index 4b1567bb..370d3eec 100644 --- a/Source/SPBundleHTMLOutputController.m +++ b/Source/SPBundleHTMLOutputController.m @@ -25,6 +25,7 @@ #import "SPBundleHTMLOutputController.h" #import "SPAlertSheets.h" #import "SPPrintAccessory.h" +#import "SPAppController.h" @class WebScriptCallFrame; @@ -42,7 +43,7 @@ - (id)init { - if (self = [super initWithWindowNibName:@"BundleHTMLOutput"]) { + if ((self = [super initWithWindowNibName:@"BundleHTMLOutput"])) { [[self window] setReleasedWhenClosed:YES]; @@ -115,7 +116,6 @@ long allFlags = (NSShiftKeyMask|NSControlKeyMask|NSAlternateKeyMask|NSCommandKeyMask); NSString *characters = [theEvent characters]; NSString *charactersIgnMod = [theEvent charactersIgnoringModifiers]; - unichar insertedCharacter = [characters characterAtIndex:0]; long curFlags = ([theEvent modifierFlags] & allFlags); if(curFlags & NSCommandKeyMask) { diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m index 665119da..9a7dedbf 100644 --- a/Source/SPConnectionControllerDelegate.m +++ b/Source/SPConnectionControllerDelegate.m @@ -25,6 +25,7 @@ #import "SPConnectionControllerDelegate.h" #import "SPTableTextFieldCell.h" +#import "SPFavoriteNode.h" @implementation SPConnectionController (SPConnectionControllerDelegate) diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m index 3b84d867..589cf2b3 100644 --- a/Source/SPCopyTable.m +++ b/Source/SPCopyTable.m @@ -1147,7 +1147,6 @@ NSInteger kBlobAsImageFile = 4; NSString *cmd = [cmdData objectForKey:SPBundleFileCommandKey]; NSString *inputAction = @""; NSString *inputFallBackAction = @""; - NSString *withBlobHandling = @""; NSError *err = nil; NSString *uuid = [NSString stringWithNewUUID]; NSString *bundleInputFilePath = [NSString stringWithFormat:@"%@_%@", SPBundleTaskInputFilePath, uuid]; diff --git a/Source/SPDataImport.m b/Source/SPDataImport.m index bfde3a26..f60fb0f4 100644 --- a/Source/SPDataImport.m +++ b/Source/SPDataImport.m @@ -363,7 +363,6 @@ NSInteger dataBufferPosition = 0; NSInteger dataBufferLastQueryEndPosition = 0; BOOL fileIsCompressed; - BOOL importSQLAsUTF8 = YES; BOOL allDataRead = NO; BOOL ignoreSQLErrors = ([importSQLErrorHandlingPopup selectedTag] == SPSQLImportIgnoreErrors); NSStringEncoding sqlEncoding = NSUTF8StringEncoding; diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index d98be016..49f50860 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -56,7 +56,7 @@ #import "SPDatabaseRename.h" #import "SPServerSupport.h" #import "SPTooltip.h" - +#import "SPDatabaseViewController.h" @interface SPDatabaseDocument (PrivateAPI) diff --git a/Source/SPEditSheetTextView.m b/Source/SPEditSheetTextView.m index 95fcd51d..7a4fb37c 100644 --- a/Source/SPEditSheetTextView.m +++ b/Source/SPEditSheetTextView.m @@ -30,9 +30,8 @@ - (id)init { - if(self = [super init]) + if((self = [super init])) { - ; } return self; } diff --git a/Source/SPEditorPreferencePane.m b/Source/SPEditorPreferencePane.m index 50388e8a..561817db 100644 --- a/Source/SPEditorPreferencePane.m +++ b/Source/SPEditorPreferencePane.m @@ -546,7 +546,7 @@ static const NSString *SPDefaultExportColourSchemeName = @"MyTheme"; return [editThemeListItems count]; } - return nil; + return 0; } - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex @@ -806,11 +806,7 @@ static const NSString *SPDefaultExportColourSchemeName = @"MyTheme"; NSMutableDictionary *scheme = [NSMutableDictionary dictionary]; NSMutableDictionary *mainsettings = [NSMutableDictionary dictionary]; NSMutableArray *settings = [NSMutableArray array]; - - CGFloat red, green, blue, alpha; - NSInteger redInt, greenInt, blueInt, alphaInt; - NSString *redHexValue, *greenHexValue, *blueHexValue, *alphaHexValue; - + [prefs synchronize]; NSColor *aColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]; diff --git a/Source/SPExportFileUtilities.m b/Source/SPExportFileUtilities.m index 5a9d16ee..b4d31d67 100644 --- a/Source/SPExportFileUtilities.m +++ b/Source/SPExportFileUtilities.m @@ -26,6 +26,9 @@ #import "SPExportFileUtilities.h" #import "SPExporter.h" #import "SPAlertSheets.h" +#import "SPExportFile.h" +#import "SPDatabaseDocument.h" +#import "SPCustomQuery.h" @implementation SPExportController (SPExportFileUtilities) diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m index db951b5f..3bd90991 100644 --- a/Source/SPExportInitializer.m +++ b/Source/SPExportInitializer.m @@ -38,6 +38,8 @@ #import "SPSQLExporter.h" #import "SPXMLExporter.h" #import "SPDotExporter.h" +#import "SPConnectionControllerDelegateProtocol.h" +#import "SPExportFile.h" @implementation SPExportController (SPExportInitializer) @@ -174,7 +176,6 @@ */ - (void)exportTables:(NSArray *)exportTables orDataArray:(NSArray *)dataArray { - NSUInteger i; BOOL singleFileHandleSet = NO; SPExportFile *singleExportFile = nil, *file = nil; diff --git a/Source/SPFavoritesPreferencePane.m b/Source/SPFavoritesPreferencePane.m index 15725c3f..7d108364 100644 --- a/Source/SPFavoritesPreferencePane.m +++ b/Source/SPFavoritesPreferencePane.m @@ -27,6 +27,8 @@ #import "SPFavoriteTextFieldCell.h" #import "SPPreferenceController.h" #import "SPKeychain.h" +#import <BWToolkitFramework/BWToolkitFramework.h> +#import "SPGeneralPreferencePane.h" @interface SPFavoritesPreferencePane (PrivateAPI) diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index abc00d9a..ca7f7f7d 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -112,7 +112,7 @@ maxWindowWidth = 450; - if(self = [super initWithContentRect:NSMakeRect(0,0,maxWindowWidth,0) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]) + if((self = [super initWithContentRect:NSMakeRect(0,0,maxWindowWidth,0) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES])) { mutablePrefix = [NSMutableString new]; originalFilterString = [NSMutableString new]; @@ -217,7 +217,7 @@ selectedDb:(NSString*)selectedDb caretMovedLeft:(BOOL)caretMovedLeft autoComplete:(BOOL)autoComplete oneColumn:(BOOL)oneColumn alias:(NSString*)anAlias isQueryingDBStructure:(BOOL)isQueryingDBStructure { - if(self = [self init]) + if((self = [self init])) { // Set filter string diff --git a/Source/SPOutlineView.m b/Source/SPOutlineView.m index 256090e2..4e8f0f0a 100644 --- a/Source/SPOutlineView.m +++ b/Source/SPOutlineView.m @@ -28,8 +28,7 @@ - (id)init { - if(self = [super init]){ - ; + if((self = [super init])){ } return self; } diff --git a/Source/SPPreferencesUpgrade.m b/Source/SPPreferencesUpgrade.m index 350ef7e8..edeb9b10 100644 --- a/Source/SPPreferencesUpgrade.m +++ b/Source/SPPreferencesUpgrade.m @@ -69,17 +69,17 @@ void SPApplyRevisionChanges(void) databaseEnumerator = [[prefs objectForKey:SPTableColumnWidths] keyEnumerator]; - while (databaseKey = [databaseEnumerator nextObject]) + while ((databaseKey = [databaseEnumerator nextObject])) { newDatabase = [[NSMutableDictionary alloc] init]; tableEnumerator = [[[prefs objectForKey:SPTableColumnWidths] objectForKey:databaseKey] keyEnumerator]; - while (tableKey = [tableEnumerator nextObject]) + while ((tableKey = [tableEnumerator nextObject])) { newTable = [[NSMutableDictionary alloc] init]; columnEnumerator = [[[[prefs objectForKey:SPTableColumnWidths] objectForKey:databaseKey] objectForKey:tableKey] keyEnumerator]; - while (columnKey = [columnEnumerator nextObject]) + while ((columnKey = [columnEnumerator nextObject])) { columnWidth = [[[[[prefs objectForKey:SPTableColumnWidths] objectForKey:databaseKey] objectForKey:tableKey] objectForKey:columnKey] doubleValue]; @@ -129,7 +129,7 @@ void SPApplyRevisionChanges(void) keyEnumerator = [keysToUpgrade keyEnumerator]; - while (newKey = [keyEnumerator nextObject]) + while ((newKey = [keyEnumerator nextObject])) { oldKey = [keysToUpgrade objectForKey:newKey]; diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m index e112e624..ceed74b4 100644 --- a/Source/SPSSHTunnel.m +++ b/Source/SPSSHTunnel.m @@ -425,7 +425,7 @@ if ([notificationText length]) { messages = [notificationText componentsSeparatedByString:@"\n"]; enumerator = [messages objectEnumerator]; - while (message = [[enumerator nextObject] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]) { + while ((message = [[enumerator nextObject] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]])) { if (![message length]) continue; [debugMessagesLock lock]; [debugMessages addObject:[NSString stringWithString:message]]; diff --git a/Source/SPServerSupport.m b/Source/SPServerSupport.m index 6f8213d6..1aebc0d4 100644 --- a/Source/SPServerSupport.m +++ b/Source/SPServerSupport.m @@ -205,7 +205,7 @@ - (NSString *)description { unsigned int i; - NSString *description = [NSMutableString stringWithFormat:@"<%@: Server is MySQL version %d.%d.%d. Supports:\n", [self className], serverMajorVersion, serverMinorVersion, serverReleaseVersion]; + NSMutableString *description = [NSMutableString stringWithFormat:@"<%@: Server is MySQL version %d.%d.%d. Supports:\n", [self className], serverMajorVersion, serverMinorVersion, serverReleaseVersion]; Ivar *vars = class_copyIvarList([self class], &i); diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m index a8346399..21059ba2 100644 --- a/Source/SPStringAdditions.m +++ b/Source/SPStringAdditions.m @@ -25,6 +25,7 @@ #import "SPStringAdditions.h" #import "RegexKitLite.h" +#import "SPDatabaseDocument.h" @interface NSString (PrivateAPI) diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index a127e51d..8ff7efc4 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -4444,9 +4444,6 @@ // Trap the escape key if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(cancelOperation:)] ) { - - NSUInteger row = [control editedRow]; - // Abort editing [control abortEditing]; if(control == tableContentView) @@ -4530,7 +4527,6 @@ NSString *re1 = @"^\\s*(<[=>]?|>=?|!?=|≠|≤|≥)\\s*(.*?)\\s*$"; NSString *re2 = @"^\\s*(.*)\\s+(.*?)\\s*$"; - NSCharacterSet *whiteSpaceCharSet = [NSCharacterSet whitespaceAndNewlineCharacterSet]; NSInteger editedRow = [filterTableView editedRow]; diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m index 1cd5ca4e..006c2f98 100644 --- a/Source/SPTableStructure.m +++ b/Source/SPTableStructure.m @@ -189,7 +189,6 @@ { NSArray *theTableIndexes; NSMutableDictionary *theTableEnumLists = [NSMutableDictionary dictionary]; - NSInteger i; // Check whether a save of the current row is required. if ( ![[self onMainThread] saveRowOnDeselect] ) return; diff --git a/Source/SPTableStructureDelegate.m b/Source/SPTableStructureDelegate.m index 729091d6..23ac801b 100644 --- a/Source/SPTableStructureDelegate.m +++ b/Source/SPTableStructureDelegate.m @@ -25,6 +25,10 @@ #import "SPTableStructureDelegate.h" #import "SPAlertSheets.h" +#import "SPDatabaseData.h" +#import "SPDatabaseViewController.h" +#import "SPTableData.h" +#import "SPTableFieldValidation.h" @implementation SPTableStructure (SPTableStructureDelegate) @@ -498,7 +502,7 @@ // validate cell against current field type NSDictionary *theRow = NSArrayObjectAtIndex(tableFields, rowIndex); NSString *theRowType = @""; - if(theRowType = [theRow objectForKey:@"type"]) + if((theRowType = [theRow objectForKey:@"type"])) theRowType = [[theRowType stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] uppercaseString]; // Only string fields allow encoding settings diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index 79df1a4d..73a219dc 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -1229,7 +1229,6 @@ - (BOOL)selectItemsWithNames:(NSArray *)theNames { NSInteger i, tableType; - NSInteger itemIndex = NSNotFound; NSMutableIndexSet *selectionIndexSet = [NSMutableIndexSet indexSet]; // Loop through the unfiltered tables/views to find the desired item diff --git a/Source/SPTextView.m b/Source/SPTextView.m index 705f2a8a..2fcebd14 100644 --- a/Source/SPTextView.m +++ b/Source/SPTextView.m @@ -415,8 +415,6 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) continue; } - NSString *dbpath = [db substringFromIndex:[db rangeOfString:SPUniqueSchemaDelimiter].location]; - NSMutableArray *sortedTables = [NSMutableArray array]; if(aTableNameExists) { [sortedTables addObject:aTableName_id]; |