[Scummvm-git-logs] scummvm master -> db7699228ca16ca004b6ad4a31fd18ef1665b432

bluegr bluegr at gmail.com
Fri Oct 22 23:48:29 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
db7699228c MISC: Fix printf long/int64 type mismatches


Commit: db7699228ca16ca004b6ad4a31fd18ef1665b432
    https://github.com/scummvm/scummvm/commit/db7699228ca16ca004b6ad4a31fd18ef1665b432
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2021-10-23T02:48:27+03:00

Commit Message:
MISC: Fix printf long/int64 type mismatches

Cast to [unsigned] long.

Changed paths:
    backends/cloud/googledrive/googledriveuploadrequest.cpp
    backends/cloud/onedrive/onedriveuploadrequest.cpp
    engines/advancedDetector.cpp


diff --git a/backends/cloud/googledrive/googledriveuploadrequest.cpp b/backends/cloud/googledrive/googledriveuploadrequest.cpp
index 617a99fce0..3dc3665c49 100644
--- a/backends/cloud/googledrive/googledriveuploadrequest.cpp
+++ b/backends/cloud/googledrive/googledriveuploadrequest.cpp
@@ -215,7 +215,7 @@ void GoogleDriveUploadRequest::uploadNextPart() {
 		if (_contentsStream->pos() == 0)
 			request->addHeader(Common::String::format("Content-Length: 0"));
 		else
-			request->addHeader(Common::String::format("Content-Range: bytes %u-%lu/%lu", oldPos, _contentsStream->pos() - 1, _contentsStream->size()));
+			request->addHeader(Common::String::format("Content-Range: bytes %u-%lu/%lu", oldPos, long(_contentsStream->pos() - 1), long(_contentsStream->size())));
 	}
 
 	_workingRequest = ConnMan.addRequest(request);
diff --git a/backends/cloud/onedrive/onedriveuploadrequest.cpp b/backends/cloud/onedrive/onedriveuploadrequest.cpp
index e8339acf7a..123a8bf254 100644
--- a/backends/cloud/onedrive/onedriveuploadrequest.cpp
+++ b/backends/cloud/onedrive/onedriveuploadrequest.cpp
@@ -103,7 +103,9 @@ void OneDriveUploadRequest::uploadNextPart() {
 	request->setBuffer(buffer, size);
 
 	if (_uploadUrl != "") {
-		request->addHeader(Common::String::format("Content-Range: bytes %u-%lu/%lu", oldPos, _contentsStream->pos() - 1, _contentsStream->size()));
+		request->addHeader(Common::String::format("Content-Range: bytes %u-%lu/%lu", oldPos,
+												  static_cast<unsigned long>(_contentsStream->pos() - 1),
+												  static_cast<unsigned long>(_contentsStream->size())));
 	} else if (_contentsStream->size() == 0) {
 		warning("\"Sorry, OneDrive can't upload empty files\"");
 		finishUpload(StorageFile(_savePath, 0, 0, false));
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index d41875f641..8d6cb9f810 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -581,7 +581,7 @@ ADDetectedGames AdvancedMetaEngineDetection::detectGame(const Common::FSNode &pa
 
 			FileProperties tmp;
 			if (getFileProperties(allFiles, *g, fname, tmp)) {
-				debugC(3, kDebugGlobalDetection, "> '%s': '%s' %ld", key.c_str(), tmp.md5.c_str(), tmp.size);
+				debugC(3, kDebugGlobalDetection, "> '%s': '%s' %ld", key.c_str(), tmp.md5.c_str(), long(tmp.size));
 			}
 
 			// Both positive and negative results are cached to avoid
@@ -635,7 +635,7 @@ ADDetectedGames AdvancedMetaEngineDetection::detectGame(const Common::FSNode &pa
 			}
 
 			if (fileDesc->fileSize != -1 && fileDesc->fileSize != filesProps[key].size) {
-				debugC(3, kDebugGlobalDetection, "Size Mismatch. Skipping (%ld) (%ld)", fileDesc->fileSize, filesProps[key].size);
+				debugC(3, kDebugGlobalDetection, "Size Mismatch. Skipping (%ld) (%ld)", long(fileDesc->fileSize), long(filesProps[key].size));
 				game.hasUnknownFiles = true;
 				continue;
 			}




More information about the Scummvm-git-logs mailing list