diff options
author | Max <post@wickenrode.com> | 2015-02-03 23:01:42 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-02-03 23:01:42 +0100 |
commit | 19a1c9f81ec1ae6f5518babfb974ad7f01407b16 (patch) | |
tree | fc320b5853c8366b2302c47b713b6620cc403b52 | |
parent | 24fcf917473862ddabc2095447f3ec5c4e9081fd (diff) | |
download | sequelpro-19a1c9f81ec1ae6f5518babfb974ad7f01407b16.tar.gz sequelpro-19a1c9f81ec1ae6f5518babfb974ad7f01407b16.tar.bz2 sequelpro-19a1c9f81ec1ae6f5518babfb974ad7f01407b16.zip |
Fix some minor compiler warnings
-rw-r--r-- | Source/SPExportController+SharedPrivateAPI.h | 35 | ||||
-rw-r--r-- | Source/SPExportController.m | 1 | ||||
-rw-r--r-- | Source/SPExportFileUtilities.m | 4 | ||||
-rw-r--r-- | Source/SPExportFilenameUtilities.m | 6 | ||||
-rw-r--r-- | Source/SPExportInitializer.m | 6 | ||||
-rw-r--r-- | Source/SPTablesList.m | 2 | ||||
-rw-r--r-- | sequel-pro.xcodeproj/project.pbxproj | 2 |
7 files changed, 52 insertions, 4 deletions
diff --git a/Source/SPExportController+SharedPrivateAPI.h b/Source/SPExportController+SharedPrivateAPI.h new file mode 100644 index 00000000..067c4645 --- /dev/null +++ b/Source/SPExportController+SharedPrivateAPI.h @@ -0,0 +1,35 @@ +// +// SPExportController+SharedPrivateAPI.h +// sequel-pro +// +// Created by Max Lohrmann on 03.02.15. +// Copyright (c) 2015 Max Lohrmann. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +// More info at <https://github.com/sequelpro/sequelpro> + +#import "SPExportController.h" + +@interface SPExportController (SharedPrivateAPI) +- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo; +@end diff --git a/Source/SPExportController.m b/Source/SPExportController.m index f650bab9..c13e4fc6 100644 --- a/Source/SPExportController.m +++ b/Source/SPExportController.m @@ -41,6 +41,7 @@ #import "SPDatabaseDocument.h" #import "SPThreadAdditions.h" #import "SPCustomQuery.h" +#import "SPExportController+SharedPrivateAPI.h" #import <SPMySQL/SPMySQL.h> diff --git a/Source/SPExportFileUtilities.m b/Source/SPExportFileUtilities.m index 778deb3e..0cecad91 100644 --- a/Source/SPExportFileUtilities.m +++ b/Source/SPExportFileUtilities.m @@ -36,6 +36,7 @@ #import "SPCustomQuery.h" #import "SPTableContent.h" #import "SPTableContentDelegate.h" +#import "SPExportController+SharedPrivateAPI.h" #import <SPMySQL/SPMySQL.h> @@ -48,10 +49,7 @@ typedef enum SPExportErrorChoice; @interface SPExportController (SPExportFileUtilitiesPrivateAPI) - - (void)_reopenExportSheet; -- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo; - @end @implementation SPExportController (SPExportFileUtilitiesPrivateAPI) diff --git a/Source/SPExportFilenameUtilities.m b/Source/SPExportFilenameUtilities.m index b0070f31..df9d3a69 100644 --- a/Source/SPExportFilenameUtilities.m +++ b/Source/SPExportFilenameUtilities.m @@ -298,6 +298,12 @@ case SPDotExport: extension = @"dot"; break; + case SPPDFExport: + case SPHTMLExport: + case SPExcelExport: + default: + [NSException raise:NSInvalidArgumentException format:@"unsupported exportType=%lu",exportType]; + return nil; } if ([exportOutputCompressionFormatPopupButton indexOfSelectedItem] != SPNoCompression) { diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m index 26cdd0dc..7794d1e4 100644 --- a/Source/SPExportInitializer.m +++ b/Source/SPExportInitializer.m @@ -168,6 +168,12 @@ case SPDotExport: exportTypeLabel = @"Dot"; break; + case SPPDFExport: + case SPHTMLExport: + case SPExcelExport: + default: + [NSException raise:NSInvalidArgumentException format:@"unsupported exportType=%lu",exportType]; + return; } // Begin the export based on the source diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index 76f6d1ce..74523da3 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -1275,7 +1275,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; { NSMutableArray *returnArray = [NSMutableArray array]; NSUInteger i; - NSInteger cnt = [[self tables] count]; + NSUInteger cnt = [[self tables] count]; for(i=0; i<cnt; i++) { SPTableType tt = (SPTableType)[NSArrayObjectAtIndex([self tableTypes],i) integerValue]; if(tt == SPTableTypeTable || tt == SPTableTypeView) diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj index d9cb76c1..41e05352 100644 --- a/sequel-pro.xcodeproj/project.pbxproj +++ b/sequel-pro.xcodeproj/project.pbxproj @@ -894,6 +894,7 @@ 50D3C3501A77135F00B5429C /* SPParserUtils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SPParserUtils.c; sourceTree = "<group>"; }; 50D3C3511A77135F00B5429C /* SPParserUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPParserUtils.h; sourceTree = "<group>"; }; 50D3C35B1A771C4C00B5429C /* SPParserUtilsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPParserUtilsTest.m; sourceTree = "<group>"; }; + 50D3C3831A8177D900B5429C /* SPExportController+SharedPrivateAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SPExportController+SharedPrivateAPI.h"; sourceTree = "<group>"; }; 50E217B118174246009D3580 /* SPColorSelectorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPColorSelectorView.h; sourceTree = "<group>"; }; 50E217B218174246009D3580 /* SPColorSelectorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPColorSelectorView.m; sourceTree = "<group>"; }; 50E217B418174280009D3580 /* SPFavoriteColorSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPFavoriteColorSupport.h; sourceTree = "<group>"; }; @@ -2249,6 +2250,7 @@ 173C836C11AAD24300B8B084 /* Exporters */, 173C837C11AAD2C500B8B084 /* Delegate Protocols */, 173C837D11AAD2D300B8B084 /* Delegate Categories */, + 50D3C3831A8177D900B5429C /* SPExportController+SharedPrivateAPI.h */, ); name = "Data Export"; sourceTree = "<group>"; |