aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Tkachev2016-06-21 16:58:09 +0600
committerAlexander Tkachev2016-08-24 16:07:55 +0600
commitfa3ea83165d6c378348f61f8daec85f805626dbe (patch)
treeb0714a57eca099237dfe3c5e5018eadba1050873
parentcff183536b62c84b6de8c83c3f249466ae3e75d6 (diff)
downloadscummvm-rg350-fa3ea83165d6c378348f61f8daec85f805626dbe.tar.gz
scummvm-rg350-fa3ea83165d6c378348f61f8daec85f805626dbe.tar.bz2
scummvm-rg350-fa3ea83165d6c378348f61f8daec85f805626dbe.zip
CLOUD: Fix some warnings
Mostly on format string
-rw-r--r--backends/cloud/cloudmanager.cpp4
-rw-r--r--backends/cloud/dropbox/dropboxstorage.cpp2
-rw-r--r--backends/cloud/googledrive/googledriveuploadrequest.cpp2
-rw-r--r--backends/networking/sdl_net/getclienthandler.cpp2
-rw-r--r--common/json.cpp2
5 files changed, 6 insertions, 6 deletions
diff --git a/backends/cloud/cloudmanager.cpp b/backends/cloud/cloudmanager.cpp
index 96521178ed..b9de6d48ab 100644
--- a/backends/cloud/cloudmanager.cpp
+++ b/backends/cloud/cloudmanager.cpp
@@ -109,10 +109,10 @@ void CloudManager::save() {
Common::String name = getStorageConfigName(i);
ConfMan.set(kStoragePrefix + name + "_username", _storages[i].username, ConfMan.kCloudDomain);
ConfMan.set(kStoragePrefix + name + "_lastSync", _storages[i].lastSyncDate, ConfMan.kCloudDomain);
- ConfMan.set(kStoragePrefix + name + "_usedBytes", Common::String::format("%llu", _storages[i].usedBytes, ConfMan.kCloudDomain));
+ ConfMan.set(kStoragePrefix + name + "_usedBytes", Common::String::format("%llu", _storages[i].usedBytes), ConfMan.kCloudDomain);
}
- ConfMan.set("current_storage", Common::String::format("%d", _currentStorageIndex, ConfMan.kCloudDomain));
+ ConfMan.set("current_storage", Common::String::format("%u", _currentStorageIndex), ConfMan.kCloudDomain);
if (_activeStorage)
_activeStorage->saveConfig(kStoragePrefix + getStorageConfigName(_currentStorageIndex) + "_");
ConfMan.flushToDisk();
diff --git a/backends/cloud/dropbox/dropboxstorage.cpp b/backends/cloud/dropbox/dropboxstorage.cpp
index 3cf14d5e0b..6d73e52c43 100644
--- a/backends/cloud/dropbox/dropboxstorage.cpp
+++ b/backends/cloud/dropbox/dropboxstorage.cpp
@@ -80,7 +80,7 @@ void DropboxStorage::codeFlowComplete(Networking::JsonResponse response) {
if (json) {
Common::JSONObject result = json->asObject();
if (!result.contains("access_token") || !result.contains("uid")) {
- warning(json->stringify(true).c_str());
+ warning("%s", json->stringify(true).c_str());
warning("Bad response, no token/uid passed");
} else {
_token = result.getVal("access_token")->asString();
diff --git a/backends/cloud/googledrive/googledriveuploadrequest.cpp b/backends/cloud/googledrive/googledriveuploadrequest.cpp
index ce1fae2579..b24e02edbf 100644
--- a/backends/cloud/googledrive/googledriveuploadrequest.cpp
+++ b/backends/cloud/googledrive/googledriveuploadrequest.cpp
@@ -189,7 +189,7 @@ void GoogleDriveUploadRequest::uploadNextPart() {
uint32 oldPos = _contentsStream->pos();
if (oldPos != _serverReceivedBytes) {
if (!_contentsStream->seek(_serverReceivedBytes)) {
- warning("GoogleDriveUploadRequest: cannot upload because stream couldn't seek(%u)", _serverReceivedBytes);
+ warning("GoogleDriveUploadRequest: cannot upload because stream couldn't seek(%lu)", _serverReceivedBytes);
finishError(Networking::ErrorResponse(this, false, true, "", -1));
return;
}
diff --git a/backends/networking/sdl_net/getclienthandler.cpp b/backends/networking/sdl_net/getclienthandler.cpp
index f3d596ee93..0e73a54912 100644
--- a/backends/networking/sdl_net/getclienthandler.cpp
+++ b/backends/networking/sdl_net/getclienthandler.cpp
@@ -107,7 +107,7 @@ void GetClientHandler::prepareHeaders() {
if (!_specialHeaders.contains("Content-Length") && _stream)
setHeader("Content-Length", Common::String::format("%u", _stream->size()));
- _headers = Common::String::format("HTTP/1.1 %d %s\r\n", _responseCode, responseMessage(_responseCode));
+ _headers = Common::String::format("HTTP/1.1 %ld %s\r\n", _responseCode, responseMessage(_responseCode));
for (Common::HashMap<Common::String, Common::String>::iterator i = _specialHeaders.begin(); i != _specialHeaders.end(); ++i)
_headers += i->_key + ": " + i->_value + "\r\n";
_headers += "\r\n";
diff --git a/common/json.cpp b/common/json.cpp
index 5f63d3fe1f..f95a44f8fe 100644
--- a/common/json.cpp
+++ b/common/json.cpp
@@ -988,7 +988,7 @@ String JSONValue::stringifyImpl(size_t const indentDepth) const {
case JSONType_IntegerNumber: {
char str[80];
- sprintf(str, "%d", _integerValue);
+ sprintf(str, "%lld", _integerValue);
ret_string = str;
break;
}