Mercurial > octave-nkf
diff src/ov-perm.cc @ 9605:dfc68e6d8741
avoid some gcc warnings
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 02 Sep 2009 13:11:06 -0400 |
parents | 93f18f166aba |
children | f80c566bc751 |
line wrap: on
line diff
--- a/src/ov-perm.cc Wed Sep 02 14:30:00 2009 +0200 +++ b/src/ov-perm.cc Wed Sep 02 13:11:06 2009 -0400 @@ -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;