Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Fix various compiler warnings in Xcode 9 #198

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions OneDriveSDK/OneDriveCoreSDK/Core/ODCollectionRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
@class ODCollection;

#import "ODRequest.h"
#import "ODItem.h"

typedef void (^ODItemCompletionHandler)(ODItem *response, NSError *error);

/**
An `ODRequest` that is used to make collection requests from the service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ - (NSURLSessionDataTask *)taskWithRequest:(NSMutableURLRequest *)request
}
return [self.client.httpProvider dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error){
_state = ODTaskCompleted;

self->_state = ODTaskCompleted;
NSError *resolvedError = nil;
NSDictionary *resolvedResponse = nil;
if (!error && response){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ - (NSURLSessionDownloadTask *)taskWithRequest:(NSMutableURLRequest *)request
[self.client.logger logWithLevel:ODLogVerbose message:@"Creating download task with request : %@", request];
NSProgress *progress = self.progress;
return [self.client.httpProvider downloadTaskWithRequest:request progress:&progress completionHandler:^(NSURL *location, NSURLResponse *response, NSError *error){
_state = ODTaskCompleted;
self->_state = ODTaskCompleted;
NSInteger statusCode = ((NSHTTPURLResponse *)response).statusCode;
[self.client.logger logWithLevel:ODLogVerbose message:@"Received download response with http status code %ld", statusCode];
if (!error && statusCode != ODOK && statusCode != ODPartialContent) {
Expand Down
10 changes: 5 additions & 5 deletions OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ - (void)execute;
[self.client.authProvider appendAuthHeaders:self.request completion:^(NSMutableURLRequest *request, NSError *error){
if (self.state != ODTaskCanceled){
if (!error){
_state = ODTaskExecuting;
_innerTask = [self taskWithRequest:request];
self->_state = ODTaskExecuting;
self->_innerTask = [self taskWithRequest:request];
[self.client.logger logWithLevel:ODLogInfo message:@"Created NSURLSessionTask"];
[self.client.logger logWithLevel:ODLogVerbose message:@"Task Id : %ld", _innerTask.taskIdentifier];
[_innerTask resume];
[self.client.logger logWithLevel:ODLogVerbose message:@"Task Id : %ld", self->_innerTask.taskIdentifier];
[self->_innerTask resume];
}
else{
_state = ODTaskAuthFailed;
self->_state = ODTaskAuthFailed;
[self.client.logger logWithLevel:ODLogError message:@"Authentication Failed with error :%@", error];
[self authenticationFailedWithError:error];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#import "ODModels.h"
#import "ODCollectionRequest.h"

typedef void (^ODItemCompletionHandler)(ODItem *response, NSError *error);

typedef void (^ODChildrenCompletionHandler)(ODCollection *response, ODChildrenCollectionRequest *nextRequest, NSError *error);

@interface ODChildrenCollectionRequest : ODCollectionRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#import "ODModels.h"
#import "ODCollectionRequest.h"

typedef void (^ODItemCompletionHandler)(ODItem *response, NSError *error);

typedef void (^ODItemsCompletionHandler)(ODCollection *response, ODItemsCollectionRequest *nextRequest, NSError *error);

@interface ODItemsCollectionRequest : ODCollectionRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#import "ODModels.h"
#import "ODCollectionRequest.h"

typedef void (^ODItemCompletionHandler)(ODItem *response, NSError *error);

typedef void (^ODSharedCompletionHandler)(ODCollection *response, ODSharedCollectionRequest *nextRequest, NSError *error);

@interface ODSharedCollectionRequest : ODCollectionRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#import "ODModels.h"
#import "ODCollectionRequest.h"

typedef void (^ODItemCompletionHandler)(ODItem *response, NSError *error);

typedef void (^ODSpecialCompletionHandler)(ODCollection *response, ODSpecialCollectionRequest *nextRequest, NSError *error);

@interface ODSpecialCollectionRequest : ODCollectionRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#import "ODModels.h"
#import "ODCollectionRequest.h"

typedef void (^ODItemCompletionHandler)(ODItem *response, NSError *error);

typedef void (^ODVersionsCompletionHandler)(ODCollection *response, ODVersionsCollectionRequest *nextRequest, NSError *error);

@interface ODVersionsCollectionRequest : ODCollectionRequest
Expand Down
30 changes: 10 additions & 20 deletions OneDriveSDK/OneDriveSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@
1003AAC41B0BF3DF0039017A /* ODURLSessionProgressTask.h */,
1003AAC51B0BF3DF0039017A /* ODURLSessionProgressTask.m */,
);
path = ODURLSession;
path = ODURLSEssion;
sourceTree = "<group>";
};
10B4D1691AF821C40083D86C /* Options */ = {
Expand Down Expand Up @@ -1353,7 +1353,6 @@
10B4D32A1AF827D80083D86C /* Frameworks */,
10B4D32B1AF827D80083D86C /* Resources */,
6571E6AB65E86A4F7FB685F3 /* [CP] Copy Pods Resources */,
C85DDFB8E2937AD6EFB526DE /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand All @@ -1371,7 +1370,7 @@
10B4D1171AF8215D0083D86C /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = Microsoft;
TargetAttributes = {
10B4D11F1AF8215D0083D86C = {
Expand Down Expand Up @@ -1493,7 +1492,8 @@
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ADAL_iPad_Storyboard.storyboardc",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ADAL_iPhone_Storyboard.storyboardc",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand All @@ -1512,7 +1512,8 @@
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ADAL_iPad_Storyboard.storyboardc",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ADAL_iPhone_Storyboard.storyboardc",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand All @@ -1537,21 +1538,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
C85DDFB8E2937AD6EFB526DE /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-OneDriveSDKTests/Pods-OneDriveSDKTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -1736,12 +1722,14 @@
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_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
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;
Expand Down Expand Up @@ -1791,12 +1779,14 @@
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_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
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;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ For a complete sample application, see [OneDriveAPIExplorer](Examples/iOSExplore
For a more detailed documentation see:

* [Overview](docs/overview.md)
* [Auth] (docs/auth.md)
* [Auth](docs/auth.md)
* [Items](docs/items.md)
* [Collections](docs/collections.md)
* [Errors](docs/errors.md)
Expand Down