libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] gvars3/src GUI.cc GUI_Fltk2.cc GUI_impl_headles...


From: Edward Rosten
Subject: [libcvd-members] gvars3/src GUI.cc GUI_Fltk2.cc GUI_impl_headles...
Date: Wed, 22 Apr 2009 10:10:55 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    gvars3
Changes by:     Edward Rosten <edrosten>        09/04/22 10:10:55

Modified files:
        src            : GUI.cc GUI_Fltk2.cc GUI_impl_headless.cc 
                         GUI_non_readline.cc 

Log message:
        Fix misc. warnings

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gvars3/src/GUI.cc?cvsroot=libcvd&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/gvars3/src/GUI_Fltk2.cc?cvsroot=libcvd&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gvars3/src/GUI_impl_headless.cc?cvsroot=libcvd&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gvars3/src/GUI_non_readline.cc?cvsroot=libcvd&r1=1.2&r2=1.3

Patches:
Index: GUI.cc
===================================================================
RCS file: /cvsroot/libcvd/gvars3/src/GUI.cc,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- GUI.cc      21 Aug 2008 14:53:27 -0000      1.30
+++ GUI.cc      22 Apr 2009 10:10:54 -0000      1.31
@@ -128,20 +128,24 @@
 
        //Strip whitespace from around var;
        string::size_type s=0, e = var.length()-1; 
-       for(; isspace(var[s]) && s < var.length(); s++);
+       for(; isspace(var[s]) && s < var.length(); s++)
+       {}
        if(s==var.length()) // All whitespace before the `='?
          return false; 
-       for(; isspace(var[e]); e--);
+       for(; isspace(var[e]); e--)
+       {}
        if(e >= s)
          {
            var = var.substr(s, e-s+1);
                        
            //Strip whitespace from around val;                 
            s = 0, e = val.length() - 1;
-           for(; isspace(val[s]) && s < val.length(); s++);
+           for(; isspace(val[s]) && s < val.length(); s++)
+               {}
            if( s < val.length())
              {
-               for(; isspace(val[e]); e--);
+               for(; isspace(val[e]); e--)
+               {}
                val = val.substr(s, e-s+1);
              }
            else val = "";
@@ -614,6 +618,7 @@
   
     vector<string> v = ChopAndUnquoteString(sParams);
     if(v.size() > 0  && v[0][0] == '-')
+               {
       if(v[0].size() == 2)
        {
          switch(v[0][1])
@@ -629,6 +634,7 @@
        }
       else
        error = true;
+               }
   
     if(v.size()==1)
       pattern = v[0];

Index: GUI_Fltk2.cc
===================================================================
RCS file: /cvsroot/libcvd/gvars3/src/GUI_Fltk2.cc,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- GUI_Fltk2.cc        30 Jul 2008 00:02:19 -0000      1.12
+++ GUI_Fltk2.cc        22 Apr 2009 10:10:54 -0000      1.13
@@ -75,8 +75,6 @@
 
 void* GUI_Fltk2::do_stuff_CB(void* v)
 {
-       GUI_Fltk2* t = (GUI_Fltk2*)v;
-
        //Add a one shot timeout which makes widgets poll for changes
        fltk::add_timeout(0.02,  poll_callback,  v);
 
@@ -96,7 +94,7 @@
 
 #define UI (*(GUI_Fltk2*)(ptr))
 
-void GUI_Fltk2::InitXInterfaceCB(void* ptr, string sCommand, string sParams)
+void GUI_Fltk2::InitXInterfaceCB(void* ptr, string, string sParams)
 {
        UI.InitXInterface(sParams);
 }
@@ -160,7 +158,7 @@
 // Window
 //
 
-void GUI_Fltk2::AddWindowCB(void* ptr, string sCommand, string sParams)
+void GUI_Fltk2::AddWindowCB(void* ptr, string , string sParams)
 {
        fltk::lock();
        UI.AddWindow(sParams);
@@ -257,6 +255,7 @@
        w.win = new GUI_Fltk2_win(width, vs[0], sCaption, gui);
        w.win->end();
        w.win->show();
+       w.showme=true;
 
        fltk::check();
 
@@ -271,7 +270,7 @@
        gui->RegisterCommand(vs[0] + ".AddSmallToggleButton", AddSmallToggleCB, 
this);
 }
 
-void GUI_Fltk2::DestroyWindowCB(void* ptr, string cmd, string args)
+void GUI_Fltk2::DestroyWindowCB(void* ptr, string cmd, string )
 {
        fltk::lock();
        UI.DestroyWindow(cmd);
@@ -315,7 +314,7 @@
 {
        public:
                cmd_button2(string name, string command, class GUI* pgui)
-               :fltk::Button(0, 0, 1, 1),labl(name), cmd(command), gui(pgui)
+               :fltk::Button(0, 0, 1, 1),cmd(command),labl(name), gui(pgui)
                {
                        label(labl.c_str());
                        callback(my_callback);

Index: GUI_impl_headless.cc
===================================================================
RCS file: /cvsroot/libcvd/gvars3/src/GUI_impl_headless.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- GUI_impl_headless.cc        12 Jun 2008 10:58:44 -0000      1.2
+++ GUI_impl_headless.cc        22 Apr 2009 10:10:54 -0000      1.3
@@ -10,7 +10,7 @@
   {
   }
 
-  char ** GUI_impl::ReadlineCompletionFunction (const char *text, int start, 
int end)
+  char ** GUI_impl::ReadlineCompletionFunction (const char *, int, int)
   {
     return NULL;
   }
@@ -20,7 +20,7 @@
   }
 
 
-  void print_history(ostream &ost)
+  void print_history(ostream &)
   {
   }
 

Index: GUI_non_readline.cc
===================================================================
RCS file: /cvsroot/libcvd/gvars3/src/GUI_non_readline.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- GUI_non_readline.cc 12 Jun 2008 10:58:44 -0000      1.2
+++ GUI_non_readline.cc 22 Apr 2009 10:10:55 -0000      1.3
@@ -55,17 +55,18 @@
   void* spawn_non_readline_thread::proc(void *)
   {
     char line[1000];
+    line[999]=0;
     GUI.SetupReadlineCompletion();
 
     while(1)
       {
        cout << "> ";  
-       cin.getline (line, 1000);
+       cin.getline (line, 999);
        
-       if(quit || !line)
+       if(quit)
          break;
                  
-       if(*line)
+       if(line != string(""))
          GUI.ParseLine(line);
       }
     




reply via email to

[Prev in Thread] Current Thread [Next in Thread]