diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/drascula/drascula.cpp | 6 | ||||
-rw-r--r-- | engines/engine.cpp | 4 | ||||
-rw-r--r-- | engines/groovie/script.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 2 | ||||
-rw-r--r-- | engines/lure/scripts.cpp | 4 | ||||
-rw-r--r-- | engines/saga/rscfile.cpp | 6 | ||||
-rw-r--r-- | engines/saga/sthread.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/debugger.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/he/logic_he.cpp | 2 | ||||
-rw-r--r-- | engines/sword1/resman.cpp | 2 | ||||
-rw-r--r-- | engines/sword1/sword1.cpp | 10 |
12 files changed, 23 insertions, 23 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 32adfe7a11..83dc16f8f0 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -834,7 +834,7 @@ bool DrasculaEngine::loadDrasculaDat() { if (!in.isOpen()) { Common::String errorMessage = "You're missing the 'drascula.dat' file. Get it from the ScummVM website"; GUIErrorMessage(errorMessage); - warning(errorMessage.c_str()); + warning("%s", errorMessage.c_str()); return false; } @@ -848,7 +848,7 @@ bool DrasculaEngine::loadDrasculaDat() { if (strcmp(buf, "DRASCULA")) { Common::String errorMessage = "File 'drascula.dat' is corrupt. Get it from the ScummVM website"; GUIErrorMessage(errorMessage); - warning(errorMessage.c_str()); + warning("%s", errorMessage.c_str()); return false; } @@ -858,7 +858,7 @@ bool DrasculaEngine::loadDrasculaDat() { if (ver != DRASCULA_DAT_VER) { snprintf(buf, 256, "File 'drascula.dat' is wrong version. Expected %d but got %d. Get it from the ScummVM website", DRASCULA_DAT_VER, ver); GUIErrorMessage(buf); - warning(buf); + warning("%s", buf); return false; } diff --git a/engines/engine.cpp b/engines/engine.cpp index a663b1e139..7831651a02 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -146,7 +146,7 @@ void initGraphics(int width, int height, bool defaultTo1xScaler) { message += "'."; GUIErrorMessage(message); - error(message.c_str()); + error("%s", message.c_str()); } // Just show warnings then these occur: @@ -179,7 +179,7 @@ void GUIErrorMessage(const Common::String msg) { GUI::MessageDialog dialog(msg); dialog.runModal(); } else { - error(msg.c_str()); + error("%s", msg.c_str()); } } diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index 8564a76842..154f4e5d9f 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -53,9 +53,9 @@ void debugScript(int level, bool nl, const char *s, ...) { va_end(va); if (nl) - debug(level, buf); + debug(level, "%s", buf); else - debugN(level, buf); + debugN(level, "%s", buf); } Script::Script(GroovieEngine *vm) : diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp index 07e770518f..2c410a6ff6 100644 --- a/engines/kyra/saveload.cpp +++ b/engines/kyra/saveload.cpp @@ -259,7 +259,7 @@ void KyraEngine_v1::loadGameStateCheck(int slot) { errorMessage += "'"; GUIErrorMessage(errorMessage); - error(errorMessage.c_str()); + error("%s", errorMessage.c_str()); } } diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 897726868b..53e7ae30da 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -167,7 +167,7 @@ bool StaticResource::loadStaticResourceFile() { if (!foundWorkingKyraDat) { Common::String errorMessage = "You're missing the '" + StaticResource::staticDataFilename() + "' file or it got corrupted, (re)get it from the ScummVM website"; GUIErrorMessage(errorMessage); - error(errorMessage.c_str()); + error("%s", errorMessage.c_str()); } return true; diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp index 9b073fc1bc..85bf43608b 100644 --- a/engines/lure/scripts.cpp +++ b/engines/lure/scripts.cpp @@ -1094,7 +1094,7 @@ uint16 Script::execute(uint16 startOffset) { sprintf(debugInfo + strlen(debugInfo), " (%d)", stack[stack.size()-1]); strcat(debugInfo, ")"); - debugC(ERROR_DETAILED, kLureDebugScripts, debugInfo); + debugC(ERROR_DETAILED, kLureDebugScripts, "%s", debugInfo); } param1 = 0; param2 = 0; param3 = 0; @@ -1164,7 +1164,7 @@ uint16 Script::execute(uint16 startOffset) { break; } - debugC(ERROR_DETAILED, kLureDebugScripts, debugInfo); + debugC(ERROR_DETAILED, kLureDebugScripts, "%s", debugInfo); } } diff --git a/engines/saga/rscfile.cpp b/engines/saga/rscfile.cpp index cd4dbdd0a9..41fe510906 100644 --- a/engines/saga/rscfile.cpp +++ b/engines/saga/rscfile.cpp @@ -408,7 +408,7 @@ bool Resource::createContexts() { if (Common::File::exists(curSoundfiles[i].fileName)) { _contextsCount++; soundFileIndex = _contextsCount - 1; - sprintf(soundFileName, curSoundfiles[i].fileName); + strcpy(soundFileName, curSoundfiles[i].fileName); _vm->_gf_compressed_sounds = curSoundfiles[i].isCompressed; fileFound = true; break; @@ -452,7 +452,7 @@ bool Resource::createContexts() { if (Common::File::exists(curSoundfiles[i].fileName)) { _contextsCount++; voicesFileIndex = _contextsCount - 1; - sprintf(_voicesFileName[0], curSoundfiles[i].fileName); + strcpy(_voicesFileName[0], curSoundfiles[i].fileName); _vm->_gf_compressed_sounds = curSoundfiles[i].isCompressed; fileFound = true; @@ -519,7 +519,7 @@ bool Resource::createContexts() { _contextsCount++; digitalMusic = true; fileFound = true; - sprintf(musicFileName, musicFilesITE[i].fileName); + strcpy(musicFileName, musicFilesITE[i].fileName); break; } } diff --git a/engines/saga/sthread.cpp b/engines/saga/sthread.cpp index c1b289a060..376e15c372 100644 --- a/engines/saga/sthread.cpp +++ b/engines/saga/sthread.cpp @@ -232,7 +232,7 @@ bool Script::runThread(ScriptThread *thread, uint instructionLimit) { #define CASEOP(opName) case opName: \ if (operandChar == opName) { \ operandName = #opName; \ - debug(2, operandName); \ + debug(2, "%s", operandName); \ } debug(8, "Executing thread offset: %u (%x) stack: %d", thread->_instructionOffset, operandChar, thread->pushedSize()); diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp index a391ba5332..891b5c0135 100644 --- a/engines/scumm/debugger.cpp +++ b/engines/scumm/debugger.cpp @@ -54,7 +54,7 @@ void debugC(int channel, const char *s, ...) { vsnprintf(buf, STRINGBUFLEN, s, va); va_end(va); - debug(buf); + debug("%s", buf); } ScummDebugger::ScummDebugger(ScummEngine *s) diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp index bdb48f70ed..5bc61da76d 100644 --- a/engines/scumm/he/logic_he.cpp +++ b/engines/scumm/he/logic_he.cpp @@ -90,7 +90,7 @@ int32 LogicHE::dispatch(int op, int numArgs, int32 *args) { } strncat(str, "])", 256); - debug(0, str); + debug(0, "%s", str); #else // Used for parallel trace utility for (int i = 0; i < numArgs; i++) diff --git a/engines/sword1/resman.cpp b/engines/sword1/resman.cpp index adb84eee83..49211e7cfa 100644 --- a/engines/sword1/resman.cpp +++ b/engines/sword1/resman.cpp @@ -46,7 +46,7 @@ namespace Sword1 { GUI::MessageDialog dialog(msg); dialog.runModal(); - error(msg); + error("%s", msg); } #define MAX_PATH_LEN 260 diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 5302e5102b..75a8fedc0b 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -323,10 +323,10 @@ void SwordEngine::showFileErrorMsg(uint8 type, bool *fileExists) { if (missCnt == 1) { sprintf(msg, errorMsgs[msgId], _macCdFileList[missNum].name, (_macCdFileList[missNum].flags & FLAG_CD2) ? 2 : 1); - warning(msg); + warning("%s", msg); } else { char *pos = msg + sprintf(msg, errorMsgs[msgId + 1], missCnt); - warning(msg); + warning("%s", msg); for (int i = 0; i < ARRAYSIZE(_macCdFileList); i++) if (!fileExists[i]) { warning("\"%s\" (CD %d)", _macCdFileList[i].name, (_macCdFileList[i].flags & FLAG_CD2) ? 2 : 1); @@ -345,10 +345,10 @@ void SwordEngine::showFileErrorMsg(uint8 type, bool *fileExists) { if (missCnt == 1) { sprintf(msg, errorMsgs[msgId], _pcCdFileList[missNum].name, (_pcCdFileList[missNum].flags & FLAG_CD2) ? 2 : 1); - warning(msg); + warning("%s", msg); } else { char *pos = msg + sprintf(msg, errorMsgs[msgId + 1], missCnt); - warning(msg); + warning("%s", msg); for (int i = 0; i < ARRAYSIZE(_pcCdFileList); i++) if (!fileExists[i]) { warning("\"%s\" (CD %d)", _pcCdFileList[i].name, (_pcCdFileList[i].flags & FLAG_CD2) ? 2 : 1); @@ -359,7 +359,7 @@ void SwordEngine::showFileErrorMsg(uint8 type, bool *fileExists) { GUI::MessageDialog dialog(msg); dialog.runModal(); if (type == TYPE_IMMED) // we can't start without this file, so error() out. - error(msg); + error("%s", msg); } void SwordEngine::checkCdFiles(void) { // check if we're running from cd, hdd or what... |