summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/cmCursesLongMessageForm.cxx
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2015-09-12 14:35:36 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-16 12:42:20 (GMT)
commit6c442e5a899e07a85038c4f9c65dfe224ac9485e (patch)
tree67e6442a07c3c25a718dcf3d431844ed07fe8932 /Source/CursesDialog/cmCursesLongMessageForm.cxx
parent6dad4c25b06ae232c766d76747b080373fb2499d (diff)
downloadCMake-6c442e5a899e07a85038c4f9c65dfe224ac9485e.zip
CMake-6c442e5a899e07a85038c4f9c65dfe224ac9485e.tar.gz
CMake-6c442e5a899e07a85038c4f9c65dfe224ac9485e.tar.bz2
ccmake: Pass format string to 'printw' (#15738)
printw takes a format string as first argument, so don't pass variable strings to it directly.
Diffstat (limited to 'Source/CursesDialog/cmCursesLongMessageForm.cxx')
-rw-r--r--Source/CursesDialog/cmCursesLongMessageForm.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx
index 67e4aab..6144ddc 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.cxx
+++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx
@@ -80,12 +80,13 @@ void cmCursesLongMessageForm::UpdateStatusBar()
sprintf(version+sideSpace, "%s", vertmp);
version[width] = '\0';
+ char fmt_s[] = "%s";
curses_move(y-4,0);
attron(A_STANDOUT);
- printw(bar);
+ printw(fmt_s, bar);
attroff(A_STANDOUT);
curses_move(y-3,0);
- printw(version);
+ printw(fmt_s, version);
pos_form_cursor(this->Form);
}
@@ -101,8 +102,9 @@ void cmCursesLongMessageForm::PrintKeys()
char firstLine[512];
sprintf(firstLine, "Press [e] to exit help");
+ char fmt_s[] = "%s";
curses_move(y-2,0);
- printw(firstLine);
+ printw(fmt_s, firstLine);
pos_form_cursor(this->Form);
}