# HG changeset patch # User John W. Eaton # Date 1272052652 14400 # Node ID f88e3d5d88e22aecf5e7032de6263cad0e2d1207 # Parent 394a83606f03765d7b7aa6783bc4f23d0c6671a3 avoid GCC warnings diff -r 394a83606f03 -r f88e3d5d88e2 scripts/ChangeLog --- 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 + + * gethelp.cc (extract_help_text): Use C++ static_cast instead of + C-style cast. + 2010-04-23 Rik * scripts/*.m: Untabify scripts diff -r 394a83606f03 -r f88e3d5d88e2 scripts/gethelp.cc --- 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 (c); } if (c == '\n') diff -r 394a83606f03 -r f88e3d5d88e2 src/ChangeLog --- 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 + + * 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 * DLD-FUNCTIONS/gcd.cc (Fgcd): Use two-argument dim_vector constructor. diff -r 394a83606f03 -r f88e3d5d88e2 src/DLD-FUNCTIONS/fltk_backend.cc --- 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 (this)); @@ -465,14 +467,14 @@ axes::properties& ap = dynamic_cast (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); } diff -r 394a83606f03 -r f88e3d5d88e2 src/graphics.cc --- 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 } diff -r 394a83606f03 -r f88e3d5d88e2 src/graphics.h.in --- 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); } diff -r 394a83606f03 -r f88e3d5d88e2 src/txt-eng-ft.cc --- 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]);