Skip to content
Snippets Groups Projects
Commit 17c432d4 authored by George Nachman's avatar George Nachman
Browse files

Fix warnings new in xcode 9

parent ab2a7c9b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -109,7 +109,7 @@
key:(NSString *)key
type:(PreferenceInfoType)type
settingChanged:(void (^)(id))settingChanged
update:(BOOL (^)())update {
update:(BOOL (^)(void))update {
assert(self.delegate);
return [super defineControl:control
key:key
Loading
Loading
Loading
Loading
@@ -16,7 +16,7 @@
- (void)invalidate;
 
// Performs the block immediately, or perhaps after up to minimumInterval time.
- (void)performRateLimitedBlock:(void (^)())block;
- (void)performRateLimitedBlock:(void (^)(void))block;
 
// A target/action version of the above.
- (void)performRateLimitedSelector:(SEL)selector
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@
@implementation iTermRateLimitedUpdate {
// While nonnil, block will not be performed.
NSTimer *_timer;
void (^_block)();
void (^_block)(void);
}
 
- (void)invalidate {
Loading
Loading
@@ -21,7 +21,7 @@
_block = nil;
}
 
- (void)performRateLimitedBlock:(void (^)())block {
- (void)performRateLimitedBlock:(void (^)(void))block {
if (_timer == nil) {
block();
_timer = [NSTimer scheduledWeakTimerWithTimeInterval:self.minimumInterval
Loading
Loading
@@ -50,7 +50,7 @@
- (void)performBlockIfNeeded:(NSTimer *)timer {
_timer = nil;
if (_block != nil) {
void (^block)() = _block;
void (^block)(void) = _block;
_block = nil;
block();
}
Loading
Loading
Loading
Loading
@@ -111,7 +111,7 @@
alert.informativeText = [NSString stringWithFormat:@"HTTP request failed: %@",
[error localizedDescription] ?: @"unknown error"];
[alert runModal];
return NO;
return nil;
}
 
// Write it to disk
Loading
Loading
@@ -125,7 +125,7 @@
alert.informativeText = [NSString stringWithFormat:@"Error on file %@: %@", tempFile,
[error localizedDescription]];
[alert runModal];
return NO;
return nil;
}
 
remotePrefs = [NSDictionary dictionaryWithContentsOfFile:tempFile];
Loading
Loading
Loading
Loading
@@ -424,12 +424,12 @@ NSString *const kSemanticHistoryWorkingDirectorySubstitutionKey = @"semanticHist
- (NSString *)bundleIdForDefaultAppForURL:(NSURL *)fileUrl {
NSURL *appUrl = [[NSWorkspace sharedWorkspace] URLForApplicationToOpenURL:fileUrl];
if (!appUrl) {
return NO;
return nil;
}
 
NSBundle *appBundle = [NSBundle bundleWithURL:appUrl];
if (!appBundle) {
return NO;
return nil;
}
return [appBundle bundleIdentifier];
}
Loading
Loading
Loading
Loading
@@ -548,7 +548,7 @@ const NSInteger kLongMaximumWordLength = 100000;
 
// Make characterAt: much faster when called with the same line number over and over again. Assumes
// the line buffer won't be mutated while it's running.
- (void)performBlockWithLineCache:(void (^)())block {
- (void)performBlockWithLineCache:(void (^)(void))block {
assert(!_shouldCacheLines);
_shouldCacheLines = YES;
block();
Loading
Loading
Loading
Loading
@@ -63,7 +63,7 @@
originalCardFrame:(NSRect)originalCardFrame
postAnimationFrame:(NSRect)postAnimationFrame
superviewWidth:(CGFloat)superviewWidth
block:(void (^)())block;
block:(void (^)(void))block;
 
// Make two buttons share a row. Currently, this assumes a row has either 1 or
// 2 buttons, and both titles must be for existing buttons.
Loading
Loading
Loading
Loading
@@ -452,7 +452,7 @@ static const CGFloat kMarginBetweenTitleAndBody = 8;
originalCardFrame:(NSRect)originalCardFrame
postAnimationFrame:(NSRect)postAnimationFrame
superviewWidth:(CGFloat)superviewWidth
block:(void (^)())block {
block:(void (^)(void))block {
[CATransaction begin];
[self retain];
[CATransaction setCompletionBlock:^{
Loading
Loading
Loading
Loading
@@ -140,7 +140,7 @@ typedef void(^iTermWarningActionBlock)(iTermWarningSelection);
@property(nonatomic, copy) NSString *cancelLabel;
 
// If set then a "help" button is added to the alert box and this block is invoked when it is clicked.
@property(nonatomic, copy) void (^showHelpBlock)();
@property(nonatomic, copy) void (^showHelpBlock)(void);
 
// Modally show the alert. Returns the selection.
- (iTermWarningSelection)runModal;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment