changeset 10553:f88e3d5d88e2

avoid GCC warnings
author John W. Eaton <jwe@octave.org>
date Fri, 23 Apr 2010 15:57:32 -0400
parents 394a83606f03
children dfdc040a0c5e
files scripts/ChangeLog scripts/gethelp.cc src/ChangeLog src/DLD-FUNCTIONS/fltk_backend.cc src/graphics.cc src/graphics.h.in src/txt-eng-ft.cc
diffstat 7 files changed, 39 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Fri Apr 23 14:58:29 2010 -0400
+++ b/scripts/ChangeLog	Fri Apr 23 15:57:32 2010 -0400
@@ -1,3 +1,8 @@
+2010-04-23  John W. Eaton  <jwe@octave.org>
+
+	* gethelp.cc (extract_help_text): Use C++ static_cast instead of
+	C-style cast.
+
 2010-04-23  Rik <octave@nomad.inbox5.com>
 
    * scripts/*.m: Untabify scripts
--- a/scripts/gethelp.cc	Fri Apr 23 14:58:29 2010 -0400
+++ b/scripts/gethelp.cc	Fri Apr 23 15:57:32 2010 -0400
@@ -73,7 +73,7 @@
           if (! have_help_text)
             {
               first_comments_seen = true;
-              help_txt += (char) c;
+              help_txt += static_cast<char> (c);
             }
 
           if (c == '\n')
--- a/src/ChangeLog	Fri Apr 23 14:58:29 2010 -0400
+++ b/src/ChangeLog	Fri Apr 23 15:57:32 2010 -0400
@@ -1,3 +1,16 @@
+2010-04-23  John W. Eaton  <jwe@octave.org>
+
+	* txt-eng-ft.cc (ft_render::visit): Declare loop counter size_t,
+	not int.
+
+	* graphics.h.in (graphics_xform::untransform):  Likewise.
+	* graphics.cc (text::properties::update_text_extent): Likewise.
+	* DLD-FUNCTIONS/fltk_backend.cc	(plot_window::set_axes_currentpoint):
+	Avoid GCC shadow variable warning.
+
+	* DLD-FUNCTIONS (plot_window::plot_window): Explicitly
+	initialize all data members in the order they are declared..
+
 2010-04-23  John W. Eaton  <jwe@octave.org>
 
 	* DLD-FUNCTIONS/gcd.cc (Fgcd): Use two-argument dim_vector constructor.
--- a/src/DLD-FUNCTIONS/fltk_backend.cc	Fri Apr 23 14:58:29 2010 -0400
+++ b/src/DLD-FUNCTIONS/fltk_backend.cc	Fri Apr 23 15:57:32 2010 -0400
@@ -218,7 +218,9 @@
 {
 public:
   plot_window (int _x, int _y, int _w, int _h, figure::properties& _fp)
-    : Fl_Window (_x, _y, _w, _h, "octave"), fp (_fp), shift (0)
+    : Fl_Window (_x, _y, _w, _h, "octave"), window_label (), shift (0),
+      fp (_fp), canvas (0), autoscale (0), togglegrid (0), help (0),
+      status (0)
   {
     callback (window_close, static_cast<void*> (this));
 
@@ -465,14 +467,14 @@
     axes::properties& ap = 
       dynamic_cast<axes::properties&> (ax.get_properties ());
     
-    double x, y;
-    pixel2pos (ax, px, py, x, y);
+    double xx, yy;
+    pixel2pos (ax, px, py, xx, yy);
 
     Matrix pos (2,3,0);
-    pos(0,0) = x;
-    pos(1,0) = y;
-    pos(0,1) = x;
-    pos(1,1) = y;
+    pos(0,0) = xx;
+    pos(1,0) = yy;
+    pos(0,1) = xx;
+    pos(1,1) = yy;
 
     ap.set_currentpoint (pos);
   }
--- a/src/graphics.cc	Fri Apr 23 14:58:29 2010 -0400
+++ b/src/graphics.cc	Fri Apr 23 15:57:32 2010 -0400
@@ -4250,15 +4250,15 @@
 #endif
   box = text_renderer.get_extent (elt, get_rotation ());
 
-  Matrix extent (1, 4, 0.0);
+  Matrix ext (1, 4, 0.0);
 
   // FIXME: also handle left and bottom components
 
-  extent(0) = extent(1) = 1;
-  extent(2) = box(0);
-  extent(3) = box(1);
-
-  set_extent (extent);
+  ext(0) = ext(1) = 1;
+  ext(2) = box(0);
+  ext(3) = box(1);
+
+  set_extent (ext);
 
 #endif
 }
--- a/src/graphics.h.in	Fri Apr 23 14:58:29 2010 -0400
+++ b/src/graphics.h.in	Fri Apr 23 15:57:32 2010 -0400
@@ -2743,13 +2743,13 @@
   static Matrix xform_eye (void);
 
   ColumnVector transform (double x, double y, double z,
-                          bool scale = true) const;
+                          bool use_scale = true) const;
   
   ColumnVector untransform (double x, double y, double z,
-                            bool scale = true) const;
+                            bool use_scale = true) const;
   
-  ColumnVector untransform (double x, double y, bool scale = true) const
-    { return untransform (x, y, (zlim(0)+zlim(1))/2, scale); }
+  ColumnVector untransform (double x, double y, bool use_scale = true) const
+    { return untransform (x, y, (zlim(0)+zlim(1))/2, use_scale); }
 
   Matrix xscale (const Matrix& m) const { return sx.scale (m); }
   Matrix yscale (const Matrix& m) const { return sy.scale (m); }
--- a/src/txt-eng-ft.cc	Fri Apr 23 14:58:29 2010 -0400
+++ b/src/txt-eng-ft.cc	Fri Apr 23 15:57:32 2010 -0400
@@ -266,7 +266,7 @@
       std::string str = e.string_value ();
       FT_UInt glyph_index, previous = 0;
 
-      for (int i = 0; i < str.length (); i++)
+      for (size_t i = 0; i < str.length (); i++)
         {
           glyph_index = FT_Get_Char_Index (face, str[i]);