Browse Source

ERR: Fixed sun CC warnings.

Bill Hoffman 24 years ago
parent
commit
20308ac96a
2 changed files with 9 additions and 2 deletions
  1. 5 0
      Source/CursesDialog/ccmake.cxx
  2. 4 2
      Source/CursesDialog/cmCursesMainForm.cxx

+ 5 - 0
Source/CursesDialog/ccmake.cxx

@@ -28,6 +28,9 @@
 
 
 cmCursesForm* cmCursesForm::CurrentForm=0;
 cmCursesForm* cmCursesForm::CurrentForm=0;
 
 
+extern "C"
+{
+
 void onsig(int sig)
 void onsig(int sig)
 {
 {
   if (cmCursesForm::CurrentForm)
   if (cmCursesForm::CurrentForm)
@@ -46,6 +49,8 @@ void onsig(int sig)
     }
     }
   signal(SIGWINCH, onsig);
   signal(SIGWINCH, onsig);
 }
 }
+ 
+}
 
 
 void CMakeErrorHandler(const char* message, const char* title, bool& disable)
 void CMakeErrorHandler(const char* message, const char* title, bool& disable)
 {
 {

+ 4 - 2
Source/CursesDialog/cmCursesMainForm.cxx

@@ -384,7 +384,8 @@ void cmCursesMainForm::PrintKeys()
 
 
 
 
     curses_move(y-4,0);
     curses_move(y-4,0);
-    printw("Press [enter] to edit option");
+    char fmt[] = "Press [enter] to edit option";
+    printw(fmt);
     curses_move(y-3,0);
     curses_move(y-3,0);
     printw(firstLine);
     printw(firstLine);
     curses_move(y-2,0);
     curses_move(y-2,0);
@@ -417,7 +418,8 @@ void cmCursesMainForm::UpdateStatusBar()
     {
     {
     curses_clear();
     curses_clear();
     curses_move(0,0);
     curses_move(0,0);
-    printw("Window is too small. A size of at least %dx%d is required.",
+    char fmt[] = "Window is too small. A size of at least %dx%d is required.";
+    printw(fmt,
 	   (cmCursesMainForm::MIN_WIDTH < m_InitialWidth ?
 	   (cmCursesMainForm::MIN_WIDTH < m_InitialWidth ?
 	    m_InitialWidth : cmCursesMainForm::MIN_WIDTH), 
 	    m_InitialWidth : cmCursesMainForm::MIN_WIDTH), 
 	   cmCursesMainForm::MIN_HEIGHT);
 	   cmCursesMainForm::MIN_HEIGHT);