[Scummvm-git-logs] scummvm master -> 5e6131d07b6245dc3699a0ef248d26909bbf4f84
sluicebox
noreply at scummvm.org
Wed Nov 8 00:07:46 UTC 2023
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9dc86697f0 SCI32: Clarify logging function. PVS-Studio V547
a54b882502 SCI: Clarify text-code processing. PVS-Studio V560
bf0e734377 SCI: Add getCurrentCallOrigin error check
d0f0287e15 SCI: Remove double assignments in debugger. PVS-Studio V1048
26ba48aba7 SCI: Make parameter const ref
5e6131d07b BACKENDS: Disable Unity taskbar warning
Commit: 9dc86697f0f16f52e1789f951b812d74bc4416a0
https://github.com/scummvm/scummvm/commit/9dc86697f0f16f52e1789f951b812d74bc4416a0
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-11-07T16:07:10-08:00
Commit Message:
SCI32: Clarify logging function. PVS-Studio V547
Changed paths:
engines/sci/graphics/celobj32.h
diff --git a/engines/sci/graphics/celobj32.h b/engines/sci/graphics/celobj32.h
index 7804e6f6e3f..e71450fb977 100644
--- a/engines/sci/graphics/celobj32.h
+++ b/engines/sci/graphics/celobj32.h
@@ -130,11 +130,8 @@ struct CelInfo32 {
case kCelTypeMem:
return Common::String::format("mem %04x:%04x", PRINT_REG(bitmap));
default:
- assert(!"Should never happen");
+ return Common::String::format("unknown cel type: %d", type);
}
- // This code should not be reached but the compiler expects to see a legal
- // return from a non-void function.
- return Common::String("here be dragons");
}
};
Commit: a54b88250213c652b9a3fe4490dc092f38f40001
https://github.com/scummvm/scummvm/commit/a54b88250213c652b9a3fe4490dc092f38f40001
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-11-07T16:07:10-08:00
Commit Message:
SCI: Clarify text-code processing. PVS-Studio V560
Changed paths:
engines/sci/graphics/text16.cpp
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index 607aa927f27..d409af4e015 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -94,19 +94,18 @@ void GfxText16::ClearChar(int16 chr) {
// will process the encountered code and set new font/set color.
// Returns textcode character count.
int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int16 orgPenColor, bool doingDrawing) {
- const char *textCode = text;
- int16 textCodeSize = 0;
- char curCode;
- signed char curCodeParm;
-
// Find the end of the textcode
- while ((++textCodeSize) && (*text != 0) && (*text++ != 0x7C)) { }
+ const char *textCode = text;
+ int16 textCodeSize = 1;
+ while ((*text != 0) && (*text++ != 0x7C)) {
+ textCodeSize++;
+ }
// possible TextCodes:
// c -> sets textColor to current port pen color
// cX -> sets textColor to _textColors[X-1]
- curCode = textCode[0];
- curCodeParm = strtol(textCode+1, nullptr, 10);
+ char curCode = textCode[0];
+ signed char curCodeParm = strtol(textCode+1, nullptr, 10);
if (!Common::isDigit(textCode[1])) {
curCodeParm = -1;
}
Commit: bf0e7343777b0082d9ae9ba4191d01d037a8a51c
https://github.com/scummvm/scummvm/commit/bf0e7343777b0082d9ae9ba4191d01d037a8a51c
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-11-07T16:07:10-08:00
Commit Message:
SCI: Add getCurrentCallOrigin error check
Coverity CID 1363393
Changed paths:
engines/sci/engine/state.cpp
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index c8185d4dc11..6dacf274562 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -400,6 +400,9 @@ SciCallOrigin EngineState::getCurrentCallOrigin() const {
Common::String curObjectName = _segMan->getObjectName(xs->sendp);
Common::String curMethodName;
const Script *localScript = _segMan->getScriptIfLoaded(xs->local_segment);
+ if (localScript == nullptr) {
+ error("current script not found at: %04x", xs->local_segment);
+ }
int curScriptNr = localScript->getScriptNumber();
Selector debugSelector = xs->debugSelector;
Commit: d0f0287e159a1df0d61a3b8c7469b81463094178
https://github.com/scummvm/scummvm/commit/d0f0287e159a1df0d61a3b8c7469b81463094178
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-11-07T16:07:10-08:00
Commit Message:
SCI: Remove double assignments in debugger. PVS-Studio V1048
Changed paths:
engines/sci/console.cpp
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 71473205379..4fcdaeef980 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -3441,8 +3441,6 @@ bool Console::cmdScriptSteps(int argc, const char **argv) {
}
bool Console::cmdScriptObjects(int argc, const char **argv) {
- int curScriptNr = -1;
-
if (argc < 2) {
debugPrintf("Shows all objects inside a specified script.\n");
debugPrintf("Usage: %s <script number>\n", argv[0]);
@@ -3451,6 +3449,7 @@ bool Console::cmdScriptObjects(int argc, const char **argv) {
return true;
}
+ int curScriptNr;
if (strcmp(argv[1], "*") == 0) {
// get said-strings of all currently loaded scripts
curScriptNr = -1;
@@ -3463,8 +3462,6 @@ bool Console::cmdScriptObjects(int argc, const char **argv) {
}
bool Console::cmdScriptStrings(int argc, const char **argv) {
- int curScriptNr = -1;
-
if (argc < 2) {
debugPrintf("Shows all strings inside a specified script.\n");
debugPrintf("Usage: %s <script number>\n", argv[0]);
@@ -3473,6 +3470,7 @@ bool Console::cmdScriptStrings(int argc, const char **argv) {
return true;
}
+ int curScriptNr;
if (strcmp(argv[1], "*") == 0) {
// get strings of all currently loaded scripts
curScriptNr = -1;
@@ -3485,8 +3483,6 @@ bool Console::cmdScriptStrings(int argc, const char **argv) {
}
bool Console::cmdScriptSaid(int argc, const char **argv) {
- int curScriptNr = -1;
-
if (argc < 2) {
debugPrintf("Shows all said-strings inside a specified script.\n");
debugPrintf("Usage: %s <script number>\n", argv[0]);
@@ -3495,6 +3491,7 @@ bool Console::cmdScriptSaid(int argc, const char **argv) {
return true;
}
+ int curScriptNr;
if (strcmp(argv[1], "*") == 0) {
// get said-strings of all currently loaded scripts
curScriptNr = -1;
Commit: 26ba48aba7853abe333a15e34f7f28426f7ca591
https://github.com/scummvm/scummvm/commit/26ba48aba7853abe333a15e34f7f28426f7ca591
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-11-07T16:07:10-08:00
Commit Message:
SCI: Make parameter const ref
Changed paths:
engines/sci/engine/features.cpp
engines/sci/engine/features.h
diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp
index 67080b1280a..846a205d307 100644
--- a/engines/sci/engine/features.cpp
+++ b/engines/sci/engine/features.cpp
@@ -231,7 +231,7 @@ SciVersion GameFeatures::detectSetCursorType() {
return _setCursorType;
}
-bool GameFeatures::autoDetectLofsType(Common::String gameSuperClassName, int methodNum) {
+bool GameFeatures::autoDetectLofsType(const Common::String &gameSuperClassName, int methodNum) {
// Look up the script address
reg_t addr = getDetectionAddr(gameSuperClassName.c_str(), -1, methodNum);
diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h
index f07d58d6e3f..78a05fe20e6 100644
--- a/engines/sci/engine/features.h
+++ b/engines/sci/engine/features.h
@@ -304,7 +304,7 @@ public:
private:
reg_t getDetectionAddr(const Common::String &objName, Selector slc, int methodNum = -1);
- bool autoDetectLofsType(Common::String gameSuperClassName, int methodNum);
+ bool autoDetectLofsType(const Common::String& gameSuperClassName, int methodNum);
bool autoDetectGfxFunctionsType(int methodNum = -1);
bool autoDetectSoundType();
bool autoDetectMoveCountType();
Commit: 5e6131d07b6245dc3699a0ef248d26909bbf4f84
https://github.com/scummvm/scummvm/commit/5e6131d07b6245dc3699a0ef248d26909bbf4f84
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-11-07T16:07:11-08:00
Commit Message:
BACKENDS: Disable Unity taskbar warning
Changed paths:
backends/taskbar/unity/unity-taskbar.cpp
diff --git a/backends/taskbar/unity/unity-taskbar.cpp b/backends/taskbar/unity/unity-taskbar.cpp
index f8a8b19c436..f559a26386e 100644
--- a/backends/taskbar/unity/unity-taskbar.cpp
+++ b/backends/taskbar/unity/unity-taskbar.cpp
@@ -85,7 +85,7 @@ void UnityTaskbarManager::setProgressState(TaskbarProgressState state) {
}
void UnityTaskbarManager::addRecent(const Common::String &name, const Common::String &description) {
- warning("[UnityTaskbarManager::addRecent] Not implemented");
+ //warning("[UnityTaskbarManager::addRecent] Not implemented");
}
void UnityTaskbarManager::setCount(int count) {
More information about the Scummvm-git-logs
mailing list