aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-02-03 23:01:42 +0100
committerMax <post@wickenrode.com>2015-02-03 23:01:42 +0100
commit19a1c9f81ec1ae6f5518babfb974ad7f01407b16 (patch)
treefc320b5853c8366b2302c47b713b6620cc403b52 /Source
parent24fcf917473862ddabc2095447f3ec5c4e9081fd (diff)
downloadsequelpro-19a1c9f81ec1ae6f5518babfb974ad7f01407b16.tar.gz
sequelpro-19a1c9f81ec1ae6f5518babfb974ad7f01407b16.tar.bz2
sequelpro-19a1c9f81ec1ae6f5518babfb974ad7f01407b16.zip
Fix some minor compiler warnings
Diffstat (limited to 'Source')
-rw-r--r--Source/SPExportController+SharedPrivateAPI.h35
-rw-r--r--Source/SPExportController.m1
-rw-r--r--Source/SPExportFileUtilities.m4
-rw-r--r--Source/SPExportFilenameUtilities.m6
-rw-r--r--Source/SPExportInitializer.m6
-rw-r--r--Source/SPTablesList.m2
6 files changed, 50 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)