Skip to content

Commit 19a1c9f

Browse files
committed
Fix some minor compiler warnings
1 parent 24fcf91 commit 19a1c9f

7 files changed

+52
-4
lines changed

Diff for: Source/SPExportController+SharedPrivateAPI.h

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//
2+
// SPExportController+SharedPrivateAPI.h
3+
// sequel-pro
4+
//
5+
// Created by Max Lohrmann on 03.02.15.
6+
// Copyright (c) 2015 Max Lohrmann. All rights reserved.
7+
//
8+
// Permission is hereby granted, free of charge, to any person
9+
// obtaining a copy of this software and associated documentation
10+
// files (the "Software"), to deal in the Software without
11+
// restriction, including without limitation the rights to use,
12+
// copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
// copies of the Software, and to permit persons to whom the
14+
// Software is furnished to do so, subject to the following
15+
// conditions:
16+
//
17+
// The above copyright notice and this permission notice shall be
18+
// included in all copies or substantial portions of the Software.
19+
//
20+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21+
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22+
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23+
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25+
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26+
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27+
// OTHER DEALINGS IN THE SOFTWARE.
28+
//
29+
// More info at <https://github.com/sequelpro/sequelpro>
30+
31+
#import "SPExportController.h"
32+
33+
@interface SPExportController (SharedPrivateAPI)
34+
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
35+
@end

Diff for: Source/SPExportController.m

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#import "SPDatabaseDocument.h"
4242
#import "SPThreadAdditions.h"
4343
#import "SPCustomQuery.h"
44+
#import "SPExportController+SharedPrivateAPI.h"
4445

4546
#import <SPMySQL/SPMySQL.h>
4647

Diff for: Source/SPExportFileUtilities.m

+1-3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#import "SPCustomQuery.h"
3737
#import "SPTableContent.h"
3838
#import "SPTableContentDelegate.h"
39+
#import "SPExportController+SharedPrivateAPI.h"
3940

4041
#import <SPMySQL/SPMySQL.h>
4142

@@ -48,10 +49,7 @@
4849
SPExportErrorChoice;
4950

5051
@interface SPExportController (SPExportFileUtilitiesPrivateAPI)
51-
5252
- (void)_reopenExportSheet;
53-
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
54-
5553
@end
5654

5755
@implementation SPExportController (SPExportFileUtilitiesPrivateAPI)

Diff for: Source/SPExportFilenameUtilities.m

+6
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,12 @@ - (NSString *)currentDefaultExportFileExtension
298298
case SPDotExport:
299299
extension = @"dot";
300300
break;
301+
case SPPDFExport:
302+
case SPHTMLExport:
303+
case SPExcelExport:
304+
default:
305+
[NSException raise:NSInvalidArgumentException format:@"unsupported exportType=%lu",exportType];
306+
return nil;
301307
}
302308

303309
if ([exportOutputCompressionFormatPopupButton indexOfSelectedItem] != SPNoCompression) {

Diff for: Source/SPExportInitializer.m

+6
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ - (void)initializeExportUsingSelectedOptions
168168
case SPDotExport:
169169
exportTypeLabel = @"Dot";
170170
break;
171+
case SPPDFExport:
172+
case SPHTMLExport:
173+
case SPExcelExport:
174+
default:
175+
[NSException raise:NSInvalidArgumentException format:@"unsupported exportType=%lu",exportType];
176+
return;
171177
}
172178

173179
// Begin the export based on the source

Diff for: Source/SPTablesList.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,7 @@ - (NSArray *)allTableAndViewNames
12751275
{
12761276
NSMutableArray *returnArray = [NSMutableArray array];
12771277
NSUInteger i;
1278-
NSInteger cnt = [[self tables] count];
1278+
NSUInteger cnt = [[self tables] count];
12791279
for(i=0; i<cnt; i++) {
12801280
SPTableType tt = (SPTableType)[NSArrayObjectAtIndex([self tableTypes],i) integerValue];
12811281
if(tt == SPTableTypeTable || tt == SPTableTypeView)

Diff for: sequel-pro.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,7 @@
894894
50D3C3501A77135F00B5429C /* SPParserUtils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SPParserUtils.c; sourceTree = "<group>"; };
895895
50D3C3511A77135F00B5429C /* SPParserUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPParserUtils.h; sourceTree = "<group>"; };
896896
50D3C35B1A771C4C00B5429C /* SPParserUtilsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPParserUtilsTest.m; sourceTree = "<group>"; };
897+
50D3C3831A8177D900B5429C /* SPExportController+SharedPrivateAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SPExportController+SharedPrivateAPI.h"; sourceTree = "<group>"; };
897898
50E217B118174246009D3580 /* SPColorSelectorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPColorSelectorView.h; sourceTree = "<group>"; };
898899
50E217B218174246009D3580 /* SPColorSelectorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPColorSelectorView.m; sourceTree = "<group>"; };
899900
50E217B418174280009D3580 /* SPFavoriteColorSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPFavoriteColorSupport.h; sourceTree = "<group>"; };
@@ -2249,6 +2250,7 @@
22492250
173C836C11AAD24300B8B084 /* Exporters */,
22502251
173C837C11AAD2C500B8B084 /* Delegate Protocols */,
22512252
173C837D11AAD2D300B8B084 /* Delegate Categories */,
2253+
50D3C3831A8177D900B5429C /* SPExportController+SharedPrivateAPI.h */,
22522254
);
22532255
name = "Data Export";
22542256
sourceTree = "<group>";

0 commit comments

Comments
 (0)