aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-18 14:34:43 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commitb908b286b9767ff7a0207ce9414279ce5291762c (patch)
tree2c8074d00956983f599e5529f7df6f588a96869e /backends
parent1addefad7e29ff674828c6dad5330c87a4203f29 (diff)
downloadscummvm-rg350-b908b286b9767ff7a0207ce9414279ce5291762c.tar.gz
scummvm-rg350-b908b286b9767ff7a0207ce9414279ce5291762c.tar.bz2
scummvm-rg350-b908b286b9767ff7a0207ce9414279ce5291762c.zip
CLOUD: Fix "signed/unsigned integers" warning
The "comparison between signed and unsigned integer expressions" one. Note that in UploadRequests size() and pos() are acutally signed, because they could return -1. This commit implies that Requests are working with such Streams which doesn't.
Diffstat (limited to 'backends')
-rw-r--r--backends/cloud/dropbox/dropboxuploadrequest.cpp4
-rw-r--r--backends/cloud/onedrive/onedriveuploadrequest.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/backends/cloud/dropbox/dropboxuploadrequest.cpp b/backends/cloud/dropbox/dropboxuploadrequest.cpp
index 5765892a70..f1fb818d36 100644
--- a/backends/cloud/dropbox/dropboxuploadrequest.cpp
+++ b/backends/cloud/dropbox/dropboxuploadrequest.cpp
@@ -69,7 +69,7 @@ void DropboxUploadRequest::uploadNextPart() {
Common::JSONObject jsonRequestParameters;
if (_contentsStream->pos() == 0 || _sessionId == "") {
- if (_contentsStream->size() <= UPLOAD_PER_ONE_REQUEST) {
+ if ((uint32)_contentsStream->size() <= UPLOAD_PER_ONE_REQUEST) {
url = "https://content.dropboxapi.com/2/files/upload";
jsonRequestParameters.setVal("path", new Common::JSONValue(_savePath));
jsonRequestParameters.setVal("mode", new Common::JSONValue("overwrite"));
@@ -80,7 +80,7 @@ void DropboxUploadRequest::uploadNextPart() {
jsonRequestParameters.setVal("close", new Common::JSONValue(false));
}
} else {
- if (_contentsStream->size() - _contentsStream->pos() <= UPLOAD_PER_ONE_REQUEST) {
+ if ((uint32)(_contentsStream->size() - _contentsStream->pos()) <= UPLOAD_PER_ONE_REQUEST) {
url += "finish";
Common::JSONObject jsonCursor, jsonCommit;
jsonCursor.setVal("session_id", new Common::JSONValue(_sessionId));
diff --git a/backends/cloud/onedrive/onedriveuploadrequest.cpp b/backends/cloud/onedrive/onedriveuploadrequest.cpp
index bc54a811a9..08f45935d2 100644
--- a/backends/cloud/onedrive/onedriveuploadrequest.cpp
+++ b/backends/cloud/onedrive/onedriveuploadrequest.cpp
@@ -62,7 +62,7 @@ void OneDriveUploadRequest::start() {
void OneDriveUploadRequest::uploadNextPart() {
const uint32 UPLOAD_PER_ONE_REQUEST = 10 * 1024 * 1024;
- if (_uploadUrl == "" && _contentsStream->size() > UPLOAD_PER_ONE_REQUEST) {
+ if (_uploadUrl == "" && (uint32)_contentsStream->size() > UPLOAD_PER_ONE_REQUEST) {
Common::String url = "https://api.onedrive.com/v1.0/drive/special/approot:/"+ConnMan.urlEncode(_savePath)+":/upload.createSession"; //folder must exist
Networking::JsonCallback callback = new Common::Callback<OneDriveUploadRequest, Networking::JsonResponse>(this, &OneDriveUploadRequest::partUploadedCallback);
Networking::ErrorCallback failureCallback = new Common::Callback<OneDriveUploadRequest, Networking::ErrorResponse>(this, &OneDriveUploadRequest::partUploadedErrorCallback);