From 7046eedd387c97838f9daf5419e1081d75a53beb Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Mon, 14 Sep 2015 09:32:54 -0400 Subject: 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". --- Source/CursesDialog/cmCursesWidget.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(value.c_str())); } const char* cmCursesWidget::GetValue() -- cgit v0.12