Merge branch 'feature/fix_warnings' into 'develop'

Feature/fix warnings

See merge request BPHV_MIPS/mvm_core!2
This commit is contained in:
Suresh, Kamlesh 2019-03-15 17:25:21 -04:00
commit d7bf5d0882
8 changed files with 37 additions and 30 deletions

View File

@ -687,7 +687,7 @@
8876D5C01FB50A9E00EB2E3D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0910;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = myverizon;
TargetAttributes = {
8876D5C81FB50A9E00EB2E3D = {
@ -838,6 +838,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@ -845,6 +846,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -875,7 +877,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = NO;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@ -897,6 +899,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@ -904,6 +907,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -929,6 +933,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 11.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
@ -37,7 +36,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"

View File

@ -63,7 +63,9 @@
if ([messageStyle isEqualToString:ValueMessageStyleTopPersistent] || [messageStyle isEqualToString:ValueMessageStyleTop]) {
alert.topAlertObject = [[MVMCoreTopAlertObject alloc] initWithResponseInfo:responseInfo];
alert.topAlertObject.delegate = actionDelegate;
if ([actionDelegate conformsToProtocol:@protocol(MVMCoreTopAlertDelegateProtocol)]) {
alert.topAlertObject.delegate = (NSObject <MVMCoreTopAlertDelegateProtocol> *)actionDelegate;
}
alert.topAlertObject.pageType = pageType;
alert.type = MFAlertTypeTop;
} else if ([messageStyle isEqualToString:ValueMessageStylePopup]) {
@ -99,7 +101,9 @@
alert.alertStyle = UIAlertControllerStyleAlert;
}
}
alert.alertDelegate = actionDelegate;
if ([actionDelegate conformsToProtocol:@protocol(MVMCoreAlertDelegateProtocol)]) {
alert.alertDelegate = (NSObject <MVMCoreAlertDelegateProtocol> *)actionDelegate;
}
return alert;
}

View File

@ -83,28 +83,28 @@ static void * XXContext = &XXContext;
- (BOOL)isPaused {
__block BOOL isPaused;
dispatch_sync(self.pausedQueue, ^{
isPaused = _paused;
isPaused = self->_paused;
});
return isPaused;
}
- (void)setPaused:(BOOL)paused {
dispatch_barrier_async(self.pausedQueue, ^{
_paused = paused;
self->_paused = paused;
});
}
- (BOOL)isDisplayed {
__block BOOL isDisplayed;
dispatch_sync(self.displayedQueue, ^{
isDisplayed = _displayed;
isDisplayed = self->_displayed;
});
return isDisplayed;
}
- (void)setDisplayed:(BOOL)displayed {
dispatch_barrier_async(self.displayedQueue, ^{
_displayed = displayed;
self->_displayed = displayed;
});
}

View File

@ -56,42 +56,42 @@
- (BOOL)isPaused {
__block BOOL isPaused;
dispatch_sync(self.pausedQueue, ^{
isPaused = _paused;
isPaused = self->_paused;
});
return isPaused;
}
- (void)setPaused:(BOOL)paused {
dispatch_barrier_async(self.pausedQueue, ^{
_paused = paused;
self->_paused = paused;
});
}
- (BOOL)isDisplayed {
__block BOOL isDisplayed;
dispatch_sync(self.displayedQueue, ^{
isDisplayed = _displayed;
isDisplayed = self->_displayed;
});
return isDisplayed;
}
- (void)setDisplayed:(BOOL)displayed {
dispatch_barrier_async(self.displayedQueue, ^{
_displayed = displayed;
self->_displayed = displayed;
});
}
- (BOOL)isAnimating {
__block BOOL isAnimating;
dispatch_sync(self.animatingQueue, ^{
isAnimating = _animating;
isAnimating = self->_animating;
});
return isAnimating;
}
- (void)setAnimating:(BOOL)animating {
dispatch_barrier_async(self.animatingQueue, ^{
_animating = animating;
self->_animating = animating;
});
}

View File

@ -611,14 +611,14 @@ typedef NS_ENUM(NSUInteger, FreeBeeCampaignState) {
dispatch_async(dispatch_get_main_queue(), ^{
if (enable) {
_reachability = [Reachability reachabilityForInternetConnection];
self->_reachability = [Reachability reachabilityForInternetConnection];
// Observe the kNetworkReachabilityChangedNotification. When that notification is posted, the method reachabilityChanged will be called.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityDidChange:) name:kReachabilityChangedNotification object:nil];
[_reachability startNotifier];
} else if (_reachability) {
[self->_reachability startNotifier];
} else if (self->_reachability) {
[[NSNotificationCenter defaultCenter] removeObserver:self name:kReachabilityChangedNotification object:nil];
[_reachability stopNotifier];
_reachability = nil;
[self->_reachability stopNotifier];
self->_reachability = nil;
}
});
}

View File

@ -67,7 +67,7 @@ static NSString * const STATIC_CACHE_COMPONENT = @"StaticCache.txt";
// Filled with pages that we do not want to cache on client side.
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_pageTypesToNotCache = [NSMutableSet set];
self->_pageTypesToNotCache = [NSMutableSet set];
});
return _pageTypesToNotCache;
}
@ -77,7 +77,7 @@ static NSString * const STATIC_CACHE_COMPONENT = @"StaticCache.txt";
// Filled with modules that we do not want to cache on client side.
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_modulesToNotCache = [NSMutableSet set];
self->_modulesToNotCache = [NSMutableSet set];
});
return _modulesToNotCache;
}
@ -382,7 +382,7 @@ static NSString * const STATIC_CACHE_COMPONENT = @"StaticCache.txt";
// Create in memory cache
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_imgCache = [[NSMutableDictionary alloc] init];
self->_imgCache = [[NSMutableDictionary alloc] init];
});
return _imgCache;
}

View File

@ -44,7 +44,7 @@
- (BOOL)isExecuting {
__block BOOL isExecuting;
dispatch_sync(self.executingQueue, ^{
isExecuting = executing;
isExecuting = self->executing;
});
return isExecuting;
}
@ -52,7 +52,7 @@
- (BOOL)isFinished {
__block BOOL isFinished;
dispatch_sync(self.finishedQueue, ^{
isFinished = finished;
isFinished = self->finished;
});
return isFinished;
}
@ -73,14 +73,14 @@
if ([self isExecuting]) {
[self willChangeValueForKey:@"isExecuting"];
dispatch_barrier_async(self.executingQueue, ^{
executing = NO;
self->executing = NO;
});
[self didChangeValueForKey:@"isExecuting"];
}
if (![self isFinished]) {
[self willChangeValueForKey:@"isFinished"];
dispatch_barrier_async(self.finishedQueue, ^{
finished = YES;
self->finished = YES;
});
[self didChangeValueForKey:@"isFinished"];
}
@ -97,7 +97,7 @@
if (![self isExecuting]) {
[self willChangeValueForKey:@"isExecuting"];
dispatch_barrier_async(self.executingQueue, ^{
executing = YES;
self->executing = YES;
});
[self didChangeValueForKey:@"isExecuting"];
}