mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
CLOUD: Fix Cppcheck warnings
This commit is contained in:
parent
c7fe842f9a
commit
a449ddce15
@ -240,6 +240,7 @@ void CloudManager::connectStorage(uint32 index, Common::String code) {
|
||||
// in these constructors Storages request token using the passed code
|
||||
// when the token is received, they call replaceStorage()
|
||||
// or removeStorage(), if some error occurred
|
||||
// thus, no memory leak happens
|
||||
}
|
||||
|
||||
void CloudManager::printBool(Storage::BoolResponse response) const {
|
||||
|
@ -135,7 +135,7 @@ Networking::Request *DropboxStorage::streamFileById(Common::String path, Network
|
||||
|
||||
Networking::NetworkReadStreamResponse response = request->execute();
|
||||
if (callback) (*callback)(response);
|
||||
return response.request;
|
||||
return response.request; // no leak here, response.request == request
|
||||
}
|
||||
|
||||
Networking::Request *DropboxStorage::createDirectory(Common::String path, BoolCallback callback, Networking::ErrorCallback errorCallback) {
|
||||
|
@ -137,10 +137,10 @@ void DropboxUploadRequest::partUploadedCallback(Networking::JsonResponse respons
|
||||
//debug("%s", json->stringify(true).c_str());
|
||||
|
||||
if (object.contains("error") || object.contains("error_summary")) {
|
||||
warning("Dropbox returned error: %s", object.getVal("error_summary")->asString().c_str());
|
||||
delete json;
|
||||
warning("Dropbox returned error: %s", object.getVal("error_summary")->asString().c_str());
|
||||
error.response = json->stringify(true);
|
||||
finishError(error);
|
||||
delete json;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -266,9 +266,9 @@ void GoogleDriveUploadRequest::partUploadedCallback(Networking::JsonResponse res
|
||||
|
||||
if (object.contains("error")) {
|
||||
warning("GoogleDrive returned error: %s", json->stringify(true).c_str());
|
||||
delete json;
|
||||
error.response = json->stringify(true);
|
||||
finishError(error);
|
||||
delete json;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -127,9 +127,9 @@ void OneDriveUploadRequest::partUploadedCallback(Networking::JsonResponse respon
|
||||
|
||||
if (object.contains("error")) {
|
||||
warning("OneDrive returned error: %s", json->stringify(true).c_str());
|
||||
delete json;
|
||||
error.response = json->stringify(true);
|
||||
finishError(error);
|
||||
delete json;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user