[Scummvm-git-logs] scummvm branch-2-3 -> 1ca65e652e1b8295aa3a3bc082d56e50329b9c84
bluegr
bluegr at gmail.com
Sun Sep 12 19:36:59 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:
1ca65e652e SLUDGE: Fix build with Clang >= 11.0.0
Commit: 1ca65e652e1b8295aa3a3bc082d56e50329b9c84
https://github.com/scummvm/scummvm/commit/1ca65e652e1b8295aa3a3bc082d56e50329b9c84
Author: Kai Knoblich (43905002+knobix at users.noreply.github.com)
Date: 2021-09-12T22:36:09+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