summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Klausner <tk@giga.or.at>2015-09-14 13:32:54 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-16 12:42:20 (GMT)
commit7046eedd387c97838f9daf5419e1081d75a53beb (patch)
treebab5df9224162174a08ea84568fc3d3b3663a0f3
parentda1a02f77f45781c325f4916851ff42cd90b85d9 (diff)
downloadCMake-7046eedd387c97838f9daf5419e1081d75a53beb.zip
CMake-7046eedd387c97838f9daf5419e1081d75a53beb.tar.gz
CMake-7046eedd387c97838f9daf5419e1081d75a53beb.tar.bz2
ccmake: Use more-portable call to set_field_buffer (#15740)
The set_field_buffer function on NetBSD and Solaris: http://netbsd.gw.com/cgi-bin/man-cgi?set_field_buffer++NetBSD-current https://docs.oracle.com/cd/E36784_01/html/E36880/set-field-buffer-3curses.html has as third argument "char *" while ncurses has "const char *". Cast the argument type in our call to account for the missing "const".
-rw-r--r--Source/CursesDialog/cmCursesWidget.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx
index e5363f4..a12e4c2 100644
--- a/Source/CursesDialog/cmCursesWidget.cxx
+++ b/Source/CursesDialog/cmCursesWidget.cxx
@@ -49,7 +49,7 @@ void cmCursesWidget::Move(int x, int y, bool isNewPage)
void cmCursesWidget::SetValue(const std::string& value)
{
this->Value = value;
- set_field_buffer(this->Field, 0, value.c_str());
+ set_field_buffer(this->Field, 0, const_cast<char *>(value.c_str()));
}
const char* cmCursesWidget::GetValue()