[Scummvm-git-logs] scummvm master -> 31015730078739777326ae674575e96861450d4f

bluegr bluegr at gmail.com
Fri Sep 10 16:38:14 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:
3101573007 SLUDGE: Fix build with Clang >= 11.0.0


Commit: 31015730078739777326ae674575e96861450d4f
    https://github.com/scummvm/scummvm/commit/31015730078739777326ae674575e96861450d4f
Author: Kai Knoblich (43905002+knobix at users.noreply.github.com)
Date: 2021-09-10T19:38:12+03:00

Commit Message:
SLUDGE: Fix build with Clang >= 11.0.0

Clang 11 and newer check the types of return values more strictly and
generate an error if there is a discrepancy.

However the "bool loadGame()" function, returns the value "NULL", if
loading of a savegame was unsucessful, whereas Clang expects a return
value of type "bool".

Remedy the issue by using "false" as return value instead of "NULL".

Changed paths:
    engines/sludge/saveload.cpp


diff --git a/engines/sludge/saveload.cpp b/engines/sludge/saveload.cpp
index f5b483dc53..ebd1c08d48 100644
--- a/engines/sludge/saveload.cpp
+++ b/engines/sludge/saveload.cpp
@@ -192,7 +192,7 @@ bool loadGame(const Common::String &fname) {
 		headerBad = true;
 	if (headerBad) {
 		fatal(ERROR_GAME_LOAD_NO, fname);
-		return NULL;
+		return false;
 	}
 	char c;
 	c = fp->readByte();




More information about the Scummvm-git-logs mailing list