diff options
author | Paul Gilbert | 2015-05-20 08:28:12 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-05-20 08:28:12 -0400 |
commit | 30133cef0e2a840325c1b46b106628c3cccd7d04 (patch) | |
tree | 33f2fb95e81abc5e7624fc7d0d0ae9ae51b9ed43 /engines/sherlock/journal.cpp | |
parent | fe8139b57168bbb85eb1d4bb0d2c62219ee6383d (diff) | |
download | scummvm-rg350-30133cef0e2a840325c1b46b106628c3cccd7d04.tar.gz scummvm-rg350-30133cef0e2a840325c1b46b106628c3cccd7d04.tar.bz2 scummvm-rg350-30133cef0e2a840325c1b46b106628c3cccd7d04.zip |
SHERLOCK: Re-add GCC_PRINTF and fix resulting GCC warnings
Diffstat (limited to 'engines/sherlock/journal.cpp')
-rw-r--r-- | engines/sherlock/journal.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp index ba6a809b44..5a8338bdc8 100644 --- a/engines/sherlock/journal.cpp +++ b/engines/sherlock/journal.cpp @@ -732,26 +732,26 @@ bool Journal::drawJournal(int direction, int howFar) { screen.gPrint(Common::Point(53, yp), 15, "%s", lineStart.c_str() + 1); } else { width = screen.stringWidth(lineStart.c_str()); - screen.gPrint(Common::Point(53, yp), PEN_COLOR, lineStart.c_str()); - } + screen.gPrint(Common::Point(53, yp), PEN_COLOR, "%s", lineStart.c_str()); + } // Print out the found keyword Common::String lineMatch(matchP, matchP + _find.size()); - screen.gPrint(Common::Point(53 + width, yp), INV_FOREGROUND, lineMatch.c_str()); + screen.gPrint(Common::Point(53 + width, yp), INV_FOREGROUND, "%s", lineMatch.c_str()); width += screen.stringWidth(lineMatch.c_str()); // Print remainder of line - screen.gPrint(Common::Point(53 + width, yp), PEN_COLOR, matchP + _find.size()); + screen.gPrint(Common::Point(53 + width, yp), PEN_COLOR, "%s", matchP + _find.size()); } else if (_lines[temp].hasPrefix("@")) { - screen.gPrint(Common::Point(53, yp), 15, _lines[temp].c_str() + 1); + screen.gPrint(Common::Point(53, yp), 15, "%s", _lines[temp].c_str() + 1); } else { - screen.gPrint(Common::Point(53, yp), PEN_COLOR, _lines[temp].c_str()); + screen.gPrint(Common::Point(53, yp), PEN_COLOR, "%s", _lines[temp].c_str()); } } else { if (_lines[temp].hasPrefix("@")) { - screen.gPrint(Common::Point(53, yp), 15, _lines[temp].c_str() + 1); + screen.gPrint(Common::Point(53, yp), 15, "%s", _lines[temp].c_str() + 1); } else { - screen.gPrint(Common::Point(53, yp), PEN_COLOR, _lines[temp].c_str()); + screen.gPrint(Common::Point(53, yp), PEN_COLOR, "%s", _lines[temp].c_str()); } } @@ -1033,7 +1033,7 @@ int Journal::getSearchString(bool printError) { INV_FOREGROUND, "Text Not Found !"); } else if (!_find.empty()) { // There's already a search term, display it already - screen.gPrint(Common::Point(15, 185), TALK_FOREGROUND, _find.c_str()); + screen.gPrint(Common::Point(15, 185), TALK_FOREGROUND, "%s", _find.c_str()); name = _find; } @@ -1051,7 +1051,7 @@ int Journal::getSearchString(bool printError) { screen.fillRect(Common::Rect(13, 186, 306, 195), BUTTON_MIDDLE); if (!_find.empty()) { - screen.gPrint(Common::Point(15, 185), TALK_FOREGROUND, _find.c_str()); + screen.gPrint(Common::Point(15, 185), TALK_FOREGROUND, "%s", _find.c_str()); name = _find; } |