Mercurial > hg > octave-lojdl
changeset 9605:dfc68e6d8741
avoid some gcc warnings
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 02 Sep 2009 13:11:06 -0400 |
parents | 4dd8fc7c106c |
children | a04352386a6b |
files | src/ChangeLog src/graphics.cc src/ov-perm.cc |
diffstat | 3 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2009-09-02 John W. Eaton <jwe@octave.org> + + * graphics.cc (axes::properties::calc_ticklabels): + Avoid unused parameter warning from gcc. + + * ov-perm.cc (octave_perm_matrix::save_binary, + octave_perm_matrix::load_binary): Avoid shadow warning from gcc. + 2008-09-01 David Bateman <dbateman@free.fr> * DLD-FUNCTIONS/eig.cc (Feigs): Correct nesting error in option
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -3513,7 +3513,7 @@ void axes::properties::calc_ticklabels (const array_property& ticks, - any_property& labels, bool logscale) + any_property& labels, bool /*logscale*/) { Matrix values = ticks.get ().matrix_value (); Cell c (values.dims ());
--- a/src/ov-perm.cc +++ b/src/ov-perm.cc @@ -308,11 +308,11 @@ octave_perm_matrix::save_binary (std::ostream& os, bool&) { - int32_t size = matrix.rows (); + int32_t sz = matrix.rows (); bool colp = matrix.is_col_perm (); - os.write (reinterpret_cast<char *> (&size), 4); + os.write (reinterpret_cast<char *> (&sz), 4); os.write (reinterpret_cast<char *> (&colp), 1); - os.write (reinterpret_cast<const char *> (matrix.data ()), matrix.byte_size()); + os.write (reinterpret_cast<const char *> (matrix.data ()), matrix.byte_size ()); return true; } @@ -321,13 +321,13 @@ octave_perm_matrix::load_binary (std::istream& is, bool swap, oct_mach_info::float_format ) { - int32_t size; + int32_t sz; bool colp; - if (! (is.read (reinterpret_cast<char *> (&size), 4) + if (! (is.read (reinterpret_cast<char *> (&sz), 4) && is.read (reinterpret_cast<char *> (&colp), 1))) return false; - MArray<octave_idx_type> m (size); + MArray<octave_idx_type> m (sz); if (! is.read (reinterpret_cast<char *> (m.fortran_vec ()), m.byte_size ())) return false;