diff options
| author | Johannes Schickel | 2008-11-16 20:20:31 +0000 |
|---|---|---|
| committer | Johannes Schickel | 2008-11-16 20:20:31 +0000 |
| commit | 2ef8a32a0119f93483e2b58c9bd1f2f42851f9ea (patch) | |
| tree | 5acce47983e5ef5210696de8731999a016b160dd /engines/sword1 | |
| parent | e1fdb1f882c7937d34e99dbfeeb3154846eee565 (diff) | |
| download | scummvm-rg350-2ef8a32a0119f93483e2b58c9bd1f2f42851f9ea.tar.gz scummvm-rg350-2ef8a32a0119f93483e2b58c9bd1f2f42851f9ea.tar.bz2 scummvm-rg350-2ef8a32a0119f93483e2b58c9bd1f2f42851f9ea.zip | |
Fixed various g++ warnings ("format not a string literal and no format arguments").
svn-id: r35096
Diffstat (limited to 'engines/sword1')
| -rw-r--r-- | engines/sword1/resman.cpp | 2 | ||||
| -rw-r--r-- | engines/sword1/sword1.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
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... |
