From 14d60e62f8452dd433fcf275cd87fd9b8c3bd6fd Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Fri, 27 May 2016 22:37:03 +0600 Subject: CLOUD: Fix format string warnings I get 'warning: ISO C++98 does not support the '%lg' ms_printf format' warning though. --- backends/cloud/dropbox/dropboxstorage.cpp | 2 +- common/json.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/cloud/dropbox/dropboxstorage.cpp b/backends/cloud/dropbox/dropboxstorage.cpp index 3d7eafedeb..ad6702c967 100644 --- a/backends/cloud/dropbox/dropboxstorage.cpp +++ b/backends/cloud/dropbox/dropboxstorage.cpp @@ -168,7 +168,7 @@ void DropboxStorage::infoInnerCallback(StorageInfoCallback outerCallback, Networ if (outerCallback) { //Dropbox documentation states there is no errors for this API method Common::JSONObject info = json->asObject(); - Common::String uid = Common::String::format("%d", info.getVal("uid")->asNumber()); + Common::String uid = Common::String::format("%d", (int)info.getVal("uid")->asNumber()); Common::String name = info.getVal("display_name")->asString(); Common::String email = info.getVal("email")->asString(); Common::JSONObject quota = info.getVal("quota_info")->asObject(); diff --git a/common/json.cpp b/common/json.cpp index 83ce0db29d..95c9123b4e 100644 --- a/common/json.cpp +++ b/common/json.cpp @@ -934,7 +934,7 @@ String JSONValue::stringifyImpl(size_t const indentDepth) const { ret_string = "null"; else { char str[80]; - sprintf(str, "%.15Lf", _numberValue); //ss.precision(15); + sprintf(str, "%lg", _numberValue); ret_string = str; } break; -- cgit v1.2.3