[Scummvm-cvs-logs] scummvm master -> f4514069f33ba6a0ec72756a1aa3b2ae7b9ff6d1
eriktorbjorn
eriktorbjorn at telia.com
Wed Jan 2 19:33:59 CET 2013
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:
f4514069f3 JANITORIAL: Fix or silence a couple of Clang analyzer warnings
Commit: f4514069f33ba6a0ec72756a1aa3b2ae7b9ff6d1
https://github.com/scummvm/scummvm/commit/f4514069f33ba6a0ec72756a1aa3b2ae7b9ff6d1
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2013-01-02T10:31:05-08:00
Commit Message:
JANITORIAL: Fix or silence a couple of Clang analyzer warnings
Clang will produce plenty of warnings (most of them seem to be of
the "if the stars align the wrong way, this may happen" variety),
but I don't have the time or patience to look at all of them.
Changed paths:
base/commandLine.cpp
engines/scumm/gfx.cpp
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 44007c4..7f88dc0 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -145,7 +145,7 @@ static const char HELP_STRING[] =
static const char *s_appName = "scummvm";
-static void usage(const char *s, ...) GCC_PRINTF(1, 2);
+static void NORETURN_PRE usage(const char *s, ...) GCC_PRINTF(1, 2) NORETURN_POST;
static void usage(const char *s, ...) {
char buf[STRINGBUFLEN];
@@ -314,8 +314,11 @@ void registerDefaults() {
Common::String parseCommandLine(Common::StringMap &settings, int argc, const char * const *argv) {
const char *s, *s2;
+ if (!argv)
+ return Common::String();
+
// argv[0] contains the name of the executable.
- if (argv && argv[0]) {
+ if (argv[0]) {
s = strrchr(argv[0], '/');
s_appName = s ? (s+1) : argv[0];
}
@@ -579,8 +582,7 @@ static void listGames() {
"-------------------- ------------------------------------------------------\n");
const EnginePlugin::List &plugins = EngineMan.getPlugins();
- EnginePlugin::List::const_iterator iter = plugins.begin();
- for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
+ for (EnginePlugin::List::const_iterator iter = plugins.begin(); iter != plugins.end(); ++iter) {
GameList list = (**iter)->getSupportedGames();
for (GameList::iterator v = list.begin(); v != list.end(); ++v) {
printf("%-20s %s\n", v->gameid().c_str(), v->description().c_str());
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index ffff329..50ff0b3 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -3609,7 +3609,7 @@ void Gdi::unkDecode9(byte *dst, int dstPitch, const byte *src, int height) const
int i;
uint buffer = 0, mask = 128;
int h = height;
- i = run = 0;
+ run = 0;
int x = 8;
for (;;) {
More information about the Scummvm-git-logs
mailing list