changeset 18680:ee7b23a48947

Clean up a few compiler warnings. * octave-dock-widget.cc (octave_dock_widget::make_widget): Correct spelling in comment. * gl2ps-renderer.cc (draw_pixels): Declare loop variable i as int to avoid signed/unsigned comparison warning. * graphics.cc (gtk_manager::do_unregister_toolkit): Change local variable name to tk_name to avoid shadowing function input.
author Rik <rik@octave.org>
date Fri, 25 Apr 2014 20:10:23 -0700
parents a142f35f3cb6
children 99d1ef340de4
files libgui/src/octave-dock-widget.cc libinterp/corefcn/gl2ps-renderer.cc libinterp/corefcn/graphics.cc
diffstat 3 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/octave-dock-widget.cc	Fri Apr 25 15:49:03 2014 -0700
+++ b/libgui/src/octave-dock-widget.cc	Fri Apr 25 20:10:23 2014 -0700
@@ -202,7 +202,7 @@
 {
 #if defined (Q_OS_WIN32)
 
-  // windows: Since floating widget has no parent, we have to readd it
+  // windows: Since floating widget has no parent, we have to read it
 
   QSettings *settings = resource_manager::get_settings ();
 
--- a/libinterp/corefcn/gl2ps-renderer.cc	Fri Apr 25 15:49:03 2014 -0700
+++ b/libinterp/corefcn/gl2ps-renderer.cc	Fri Apr 25 20:10:23 2014 -0700
@@ -198,7 +198,7 @@
   OCTAVE_LOCAL_BUFFER (GLfloat, a, 3*w*h);
 
   // Convert to GL_FLOAT as it is the only type gl2ps accepts.
-  for (unsigned int i = 0; i < 3*w*h; i++)
+  for (int i = 0; i < 3*w*h; i++)
     a[i] = data[i] / maxval;
   
   gl2psDrawPixels (w, h, 0, 0, format, GL_FLOAT, a);
--- a/libinterp/corefcn/graphics.cc	Fri Apr 25 15:49:03 2014 -0700
+++ b/libinterp/corefcn/graphics.cc	Fri Apr 25 20:10:23 2014 -0700
@@ -9881,12 +9881,13 @@
 
           while (pa != available_toolkits.end ())
             {
-              std::string name = *pa++;
-
-              if (name == "qt"
-                  || (name == "fltk"
-                      && available_toolkits.find ("qt") == available_toolkits.end ()))
-                dtk = name;
+              std::string tk_name = *pa++;
+
+              if (tk_name == "qt"
+                  || (tk_name == "fltk"
+                      && available_toolkits.find ("qt")
+                        == available_toolkits.end ()))
+                dtk = tk_name;
             }
         }
     }