mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-17 22:23:52 +00:00
Enable XCode 9 recommended warnings and fix occurrences of them in the code
This commit is contained in:
@@ -19,7 +19,7 @@ static const int NUM_YEARS = 10;
|
|||||||
int mkcert(X509 **x509p, EVP_PKEY **pkeyp, int bits, int serial, int years);
|
int mkcert(X509 **x509p, EVP_PKEY **pkeyp, int bits, int serial, int years);
|
||||||
int add_ext(X509 *cert, int nid, char *value);
|
int add_ext(X509 *cert, int nid, char *value);
|
||||||
|
|
||||||
struct CertKeyPair generateCertKeyPair() {
|
struct CertKeyPair generateCertKeyPair(void) {
|
||||||
BIO *bio_err;
|
BIO *bio_err;
|
||||||
X509 *x509 = NULL;
|
X509 *x509 = NULL;
|
||||||
EVP_PKEY *pkey = NULL;
|
EVP_PKEY *pkey = NULL;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ typedef struct CertKeyPair {
|
|||||||
PKCS12 *p12;
|
PKCS12 *p12;
|
||||||
} CertKeyPair;
|
} CertKeyPair;
|
||||||
|
|
||||||
struct CertKeyPair generateCertKeyPair();
|
struct CertKeyPair generateCertKeyPair(void);
|
||||||
void freeCertKeyPair(CertKeyPair);
|
void freeCertKeyPair(CertKeyPair);
|
||||||
void saveCertKeyPair(const char* certFile, const char* p12File, const char* keyPairFile, CertKeyPair certKeyPair);
|
void saveCertKeyPair(const char* certFile, const char* p12File, const char* keyPairFile, CertKeyPair certKeyPair);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -996,16 +996,32 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
|
|
||||||
- (void)_getRevealWidth:(CGFloat*)pRevealWidth revealOverDraw:(CGFloat*)pRevealOverdraw forSymetry:(int)symetry
|
- (void)_getRevealWidth:(CGFloat*)pRevealWidth revealOverDraw:(CGFloat*)pRevealOverdraw forSymetry:(int)symetry
|
||||||
{
|
{
|
||||||
if ( symetry < 0 ) *pRevealWidth = _rightViewRevealWidth, *pRevealOverdraw = _rightViewRevealOverdraw;
|
if ( symetry < 0 )
|
||||||
else *pRevealWidth = _rearViewRevealWidth, *pRevealOverdraw = _rearViewRevealOverdraw;
|
{
|
||||||
|
*pRevealWidth = _rightViewRevealWidth;
|
||||||
|
*pRevealOverdraw = _rightViewRevealOverdraw;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*pRevealWidth = _rearViewRevealWidth;
|
||||||
|
*pRevealOverdraw = _rearViewRevealOverdraw;
|
||||||
|
}
|
||||||
|
|
||||||
if (*pRevealWidth < 0) *pRevealWidth = _contentView.bounds.size.width + *pRevealWidth;
|
if (*pRevealWidth < 0) *pRevealWidth = _contentView.bounds.size.width + *pRevealWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_getBounceBack:(BOOL*)pBounceBack pStableDrag:(BOOL*)pStableDrag forSymetry:(int)symetry
|
- (void)_getBounceBack:(BOOL*)pBounceBack pStableDrag:(BOOL*)pStableDrag forSymetry:(int)symetry
|
||||||
{
|
{
|
||||||
if ( symetry < 0 ) *pBounceBack = _bounceBackOnLeftOverdraw, *pStableDrag = _stableDragOnLeftOverdraw;
|
if ( symetry < 0 )
|
||||||
else *pBounceBack = _bounceBackOnOverdraw, *pStableDrag = _stableDragOnOverdraw;
|
{
|
||||||
|
*pBounceBack = _bounceBackOnLeftOverdraw;
|
||||||
|
*pStableDrag = _stableDragOnLeftOverdraw;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*pBounceBack = _bounceBackOnOverdraw;
|
||||||
|
*pStableDrag = _stableDragOnOverdraw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_getAdjustedFrontViewPosition:(FrontViewPosition*)frontViewPosition forSymetry:(int)symetry
|
- (void)_getAdjustedFrontViewPosition:(FrontViewPosition*)frontViewPosition forSymetry:(int)symetry
|
||||||
@@ -1398,11 +1414,11 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
// Primitive method for view controller deployment and animated layout to the given position.
|
// Primitive method for view controller deployment and animated layout to the given position.
|
||||||
- (void)_setFrontViewPosition:(FrontViewPosition)newPosition withDuration:(NSTimeInterval)duration
|
- (void)_setFrontViewPosition:(FrontViewPosition)newPosition withDuration:(NSTimeInterval)duration
|
||||||
{
|
{
|
||||||
void (^rearDeploymentCompletion)() = [self _rearViewDeploymentForNewFrontViewPosition:newPosition];
|
void (^rearDeploymentCompletion)(void) = [self _rearViewDeploymentForNewFrontViewPosition:newPosition];
|
||||||
void (^rightDeploymentCompletion)() = [self _rightViewDeploymentForNewFrontViewPosition:newPosition];
|
void (^rightDeploymentCompletion)(void) = [self _rightViewDeploymentForNewFrontViewPosition:newPosition];
|
||||||
void (^frontDeploymentCompletion)() = [self _frontViewDeploymentForNewFrontViewPosition:newPosition];
|
void (^frontDeploymentCompletion)(void) = [self _frontViewDeploymentForNewFrontViewPosition:newPosition];
|
||||||
|
|
||||||
void (^animations)() = ^()
|
void (^animations)(void) = ^(void)
|
||||||
{
|
{
|
||||||
// Calling this in the animation block causes the status bar to appear/dissapear in sync with our own animation
|
// Calling this in the animation block causes the status bar to appear/dissapear in sync with our own animation
|
||||||
[self setNeedsStatusBarAppearanceUpdate];
|
[self setNeedsStatusBarAppearanceUpdate];
|
||||||
@@ -1455,17 +1471,27 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
UIView *view = nil;
|
UIView *view = nil;
|
||||||
|
|
||||||
if ( operation == SWRevealControllerOperationReplaceRearController )
|
if ( operation == SWRevealControllerOperationReplaceRearController )
|
||||||
old = _rearViewController, _rearViewController = new, view = _contentView.rearView;
|
{
|
||||||
|
old = _rearViewController;
|
||||||
|
_rearViewController = new;
|
||||||
|
view = _contentView.rearView;
|
||||||
|
}
|
||||||
else if ( operation == SWRevealControllerOperationReplaceFrontController )
|
else if ( operation == SWRevealControllerOperationReplaceFrontController )
|
||||||
old = _frontViewController, _frontViewController = new, view = _contentView.frontView;
|
{
|
||||||
|
old = _frontViewController;
|
||||||
|
_frontViewController = new;
|
||||||
|
view = _contentView.frontView;
|
||||||
|
}
|
||||||
else if ( operation == SWRevealControllerOperationReplaceRightController )
|
else if ( operation == SWRevealControllerOperationReplaceRightController )
|
||||||
old = _rightViewController, _rightViewController = new, view = _contentView.rightView;
|
{
|
||||||
|
old = _rightViewController;
|
||||||
|
_rightViewController = new;
|
||||||
|
view = _contentView.rightView;
|
||||||
|
}
|
||||||
|
|
||||||
void (^completion)() = [self _transitionFromViewController:old toViewController:new inView:view];
|
void (^completion)(void) = [self _transitionFromViewController:old toViewController:new inView:view];
|
||||||
|
|
||||||
void (^animationCompletion)() = ^
|
void (^animationCompletion)(void) = ^
|
||||||
{
|
{
|
||||||
completion();
|
completion();
|
||||||
if ( [_delegate respondsToSelector:@selector(revealController:didAddViewController:forOperation:animated:)] )
|
if ( [_delegate respondsToSelector:@selector(revealController:didAddViewController:forOperation:animated:)] )
|
||||||
@@ -1527,10 +1553,10 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
|
|
||||||
_frontViewPosition = newPosition;
|
_frontViewPosition = newPosition;
|
||||||
|
|
||||||
void (^deploymentCompletion)() =
|
void (^deploymentCompletion)(void) =
|
||||||
[self _deploymentForViewController:_frontViewController inView:_contentView.frontView appear:appear disappear:disappear];
|
[self _deploymentForViewController:_frontViewController inView:_contentView.frontView appear:appear disappear:disappear];
|
||||||
|
|
||||||
void (^completion)() = ^()
|
void (^completion)(void) = ^(void)
|
||||||
{
|
{
|
||||||
deploymentCompletion();
|
deploymentCompletion();
|
||||||
if ( positionIsChanging )
|
if ( positionIsChanging )
|
||||||
@@ -1652,11 +1678,11 @@ const int FrontViewPositionNone = 0xff;
|
|||||||
|
|
||||||
if ( toController ) [self addChildViewController:toController];
|
if ( toController ) [self addChildViewController:toController];
|
||||||
|
|
||||||
void (^deployCompletion)() = [self _deployForViewController:toController inView:view];
|
void (^deployCompletion)(void) = [self _deployForViewController:toController inView:view];
|
||||||
|
|
||||||
[fromController willMoveToParentViewController:nil];
|
[fromController willMoveToParentViewController:nil];
|
||||||
|
|
||||||
void (^undeployCompletion)() = [self _undeployForViewController:fromController];
|
void (^undeployCompletion)(void) = [self _undeployForViewController:fromController];
|
||||||
|
|
||||||
void (^completionBlock)(void) = ^(void)
|
void (^completionBlock)(void) = ^(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 47;
|
objectVersion = 48;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
@@ -809,7 +809,7 @@
|
|||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastSwiftUpdateCheck = 0730;
|
LastSwiftUpdateCheck = 0730;
|
||||||
LastUpgradeCheck = 0800;
|
LastUpgradeCheck = 0920;
|
||||||
ORGANIZATIONNAME = "Moonlight Stream";
|
ORGANIZATIONNAME = "Moonlight Stream";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
D46A739F1CBC7CB60039F1EE = {
|
D46A739F1CBC7CB60039F1EE = {
|
||||||
@@ -824,7 +824,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
buildConfigurationList = FB290CE919B2C406004C83CF /* Build configuration list for PBXProject "Moonlight" */;
|
buildConfigurationList = FB290CE919B2C406004C83CF /* Build configuration list for PBXProject "Moonlight" */;
|
||||||
compatibilityVersion = "Xcode 6.3";
|
compatibilityVersion = "Xcode 8.0";
|
||||||
developmentRegion = English;
|
developmentRegion = English;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
@@ -1030,14 +1030,20 @@
|
|||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
@@ -1076,14 +1082,20 @@
|
|||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 47;
|
objectVersion = 48;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
@@ -285,11 +285,11 @@
|
|||||||
FB290E2619B37A4E004C83CF /* Project object */ = {
|
FB290E2619B37A4E004C83CF /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 0810;
|
LastUpgradeCheck = 0920;
|
||||||
ORGANIZATIONNAME = "Moonlight Stream";
|
ORGANIZATIONNAME = "Moonlight Stream";
|
||||||
};
|
};
|
||||||
buildConfigurationList = FB290E2919B37A4E004C83CF /* Build configuration list for PBXProject "moonlight-common" */;
|
buildConfigurationList = FB290E2919B37A4E004C83CF /* Build configuration list for PBXProject "moonlight-common" */;
|
||||||
compatibilityVersion = "Xcode 6.3";
|
compatibilityVersion = "Xcode 8.0";
|
||||||
developmentRegion = English;
|
developmentRegion = English;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
@@ -351,14 +351,20 @@
|
|||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
@@ -399,14 +405,20 @@
|
|||||||
CLANG_CXX_LIBRARY = "libc++";
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
|||||||
Reference in New Issue
Block a user