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/sword1.cpp | |
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/sword1.cpp')
-rw-r--r-- | engines/sword1/sword1.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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... |