From fe625ea9df834a2a3a8239e6e3bad790d4786be3 Mon Sep 17 00:00:00 2001 From: JugglerShu Date: Tue, 3 Sep 2013 00:55:34 +0900 Subject: [PATCH] Fix warnings #424 --- XVim.xcodeproj/project.pbxproj | 2 ++ XVim/XVimNormalEvaluator.m | 2 +- XVim/XVimSearch.m | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/XVim.xcodeproj/project.pbxproj b/XVim.xcodeproj/project.pbxproj index f9c2cbaf..a1339187 100644 --- a/XVim.xcodeproj/project.pbxproj +++ b/XVim.xcodeproj/project.pbxproj @@ -693,6 +693,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.6; ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; }; name = Debug; }; @@ -715,6 +716,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.6; + SDKROOT = macosx; }; name = Release; }; diff --git a/XVim/XVimNormalEvaluator.m b/XVim/XVimNormalEvaluator.m index 5a640306..aabbe0d9 100644 --- a/XVim/XVimNormalEvaluator.m +++ b/XVim/XVimNormalEvaluator.m @@ -1,4 +1,4 @@ -// +/a/ // XVimNormalEvaluator.m // XVim // diff --git a/XVim/XVimSearch.m b/XVim/XVimSearch.m index 735451c7..664c12ae 100644 --- a/XVim/XVimSearch.m +++ b/XVim/XVimSearch.m @@ -135,14 +135,14 @@ - (NSRange)searchForwardFrom:(NSUInteger)from inWindow:(XVimWindow*)window // search text beyond the search_base if( [[srcView string] length]-1 > search_base){ found = [regex rangeOfFirstMatchInString:[srcView string] - options:r_opts + options:0 range:NSMakeRange(search_base+1, [[srcView string] length] - search_base - 1)]; } // if wrapscan is on, wrap to the top and search if (found.location == NSNotFound && options.wrapscan== TRUE) { found = [regex rangeOfFirstMatchInString:[srcView string] - options:r_opts + options:0 range:NSMakeRange(0, [[srcView string] length])]; [window errorMessage:[NSString stringWithFormat: @"Search wrapped for '%@'",self.lastSearchDisplayString] ringBell:TRUE]; @@ -200,7 +200,7 @@ - (NSRange)searchBackwardFrom:(NSUInteger)from inWindow:(XVimWindow*)window } NSArray* matches = [regex matchesInString:[srcView string] - options:r_opts + options:0 range:NSMakeRange(0, [[srcView string] length]-1)]; // search above base @@ -359,7 +359,7 @@ - (NSRange)replaceForwardFrom:(NSUInteger)from to:(NSUInteger)to inWindow:(XVimW } // search text beyond the search_base - found = [regex rangeOfFirstMatchInString:[srcView string] options:r_opts range:NSMakeRange(from, [[srcView string] length] - from)]; + found = [regex rangeOfFirstMatchInString:[srcView string] options:0 range:NSMakeRange(from, [[srcView string] length] - from)]; if( found.location >= to) { return NSMakeRange(NSNotFound, 0);