Skip to content

Commit

Permalink
Fix some minor compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoagx committed Feb 3, 2015
1 parent 24fcf91 commit 19a1c9f
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 4 deletions.
35 changes: 35 additions & 0 deletions 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
1 change: 1 addition & 0 deletions Source/SPExportController.m
Expand Up @@ -41,6 +41,7 @@
#import "SPDatabaseDocument.h"
#import "SPThreadAdditions.h"
#import "SPCustomQuery.h"
#import "SPExportController+SharedPrivateAPI.h"

#import <SPMySQL/SPMySQL.h>

Expand Down
4 changes: 1 addition & 3 deletions Source/SPExportFileUtilities.m
Expand Up @@ -36,6 +36,7 @@
#import "SPCustomQuery.h"
#import "SPTableContent.h"
#import "SPTableContentDelegate.h"
#import "SPExportController+SharedPrivateAPI.h"

#import <SPMySQL/SPMySQL.h>

Expand All @@ -48,10 +49,7 @@
SPExportErrorChoice;

@interface SPExportController (SPExportFileUtilitiesPrivateAPI)

- (void)_reopenExportSheet;
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;

@end

@implementation SPExportController (SPExportFileUtilitiesPrivateAPI)
Expand Down
6 changes: 6 additions & 0 deletions Source/SPExportFilenameUtilities.m
Expand Up @@ -298,6 +298,12 @@ - (NSString *)currentDefaultExportFileExtension
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) {
Expand Down
6 changes: 6 additions & 0 deletions Source/SPExportInitializer.m
Expand Up @@ -168,6 +168,12 @@ - (void)initializeExportUsingSelectedOptions
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
Expand Down
2 changes: 1 addition & 1 deletion Source/SPTablesList.m
Expand Up @@ -1275,7 +1275,7 @@ - (NSArray *)allTableAndViewNames
{
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)
Expand Down
2 changes: 2 additions & 0 deletions sequel-pro.xcodeproj/project.pbxproj
Expand Up @@ -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>"; };
Expand Down Expand Up @@ -2249,6 +2250,7 @@
173C836C11AAD24300B8B084 /* Exporters */,
173C837C11AAD2C500B8B084 /* Delegate Protocols */,
173C837D11AAD2D300B8B084 /* Delegate Categories */,
50D3C3831A8177D900B5429C /* SPExportController+SharedPrivateAPI.h */,
);
name = "Data Export";
sourceTree = "<group>";
Expand Down

0 comments on commit 19a1c9f

Please sign in to comment.