# HG changeset patch # User John W. Eaton # Date 1233819778 18000 # Node ID 095ae5e0a8313340f5ecb4de80e70d39abe91566 # Parent 22462fd58e660c76192e3565e29f87feb788e174 eliminte some compiler warnings diff -r 22462fd58e66 -r 095ae5e0a831 liboctave/Array-util.cc --- a/liboctave/Array-util.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/liboctave/Array-util.cc Thu Feb 05 02:42:58 2009 -0500 @@ -388,8 +388,8 @@ return retval; } -dim_vector zero_dims_inquire (const Array& ia, - const dim_vector& rhdv) +dim_vector +zero_dims_inquire (const Array& ia, const dim_vector& rhdv) { int ial = ia.length (), rhdvl = rhdv.length (); dim_vector rdv; @@ -408,7 +408,6 @@ all_colons = all_colons && colon[i]; } - bool match = false; // If the number of nonscalar indices matches the dimensionality of // RHS, we try an exact match, inquiring even singleton dimensions. if (all_colons) @@ -444,8 +443,9 @@ return rdv; } -dim_vector zero_dims_inquire (const idx_vector& i, const idx_vector& j, - const dim_vector& rhdv) +dim_vector +zero_dims_inquire (const idx_vector& i, const idx_vector& j, + const dim_vector& rhdv) { bool icol = i.is_colon (), jcol = j.is_colon (); dim_vector rdv; diff -r 22462fd58e66 -r 095ae5e0a831 liboctave/ChangeLog --- a/liboctave/ChangeLog Thu Feb 05 01:19:29 2009 -0500 +++ b/liboctave/ChangeLog Thu Feb 05 02:42:58 2009 -0500 @@ -1,3 +1,17 @@ +2009-02-05 John W. Eaton + + * Array-util.cc (zero_dims_inquire): Eliminate unused variable MATCH. + + * Sparse.cc (assign (Sparse& lhs, const Sparse& rhs)): + Eliminate unused variable N. + + * MArray-f.cc (MArray::norm (float p) const, + MArray::norm (float p) const): Pass P to xnorm. + + * eigs-base.cc (EigsRealNonSymmetricFunc, EigsRealSymmetricFunc) + (EigsComplexNonSymmetricFunc): Avoid unused parameter warning. + * idx-vector.cc (idx_vector::freeze): Likewise. + 2009-02-04 Jaroslav Hajek * oct-locbuf.h: Specialize OCTAVE_LOCAL_BUFFER to use chunked diff -r 22462fd58e66 -r 095ae5e0a831 liboctave/MArray-f.cc --- a/liboctave/MArray-f.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/liboctave/MArray-f.cc Thu Feb 05 02:42:58 2009 -0500 @@ -36,7 +36,7 @@ OCTAVE_API float MArray::norm (float p) const { - return xnorm (FloatColumnVector (*this)); + return xnorm (FloatColumnVector (*this), p); } template class OCTAVE_API MArray; diff -r 22462fd58e66 -r 095ae5e0a831 liboctave/MArray-fC.cc --- a/liboctave/MArray-fC.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/liboctave/MArray-fC.cc Thu Feb 05 02:42:58 2009 -0500 @@ -39,7 +39,7 @@ OCTAVE_API float MArray::norm (float p) const { - return xnorm (FloatComplexColumnVector (*this)); + return xnorm (FloatComplexColumnVector (*this), p); } template class OCTAVE_API MArray; diff -r 22462fd58e66 -r 095ae5e0a831 liboctave/Sparse.cc --- a/liboctave/Sparse.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/liboctave/Sparse.cc Thu Feb 05 02:42:58 2009 -0500 @@ -3224,7 +3224,8 @@ { octave_idx_type lhs_len = lhs.length (); - octave_idx_type n = idx_i.freeze (lhs_len, 0, true); + // Called for side-effects on idx_i. + idx_i.freeze (lhs_len, 0, true); if (idx_i) { diff -r 22462fd58e66 -r 095ae5e0a831 liboctave/eigs-base.cc --- a/liboctave/eigs-base.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/liboctave/eigs-base.cc Thu Feb 05 02:42:58 2009 -0500 @@ -1384,8 +1384,8 @@ octave_idx_type k, octave_idx_type p, octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, ColumnVector &resid, - std::ostream& os, double tol, int rvec, bool cholB, - int disp, int maxit) + std::ostream& os, double tol, int rvec, + bool /* cholB */, int disp, int maxit) { std::string typ (_typ); bool have_sigma = (sigma ? true : false); @@ -2362,8 +2362,8 @@ octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, ColumnVector &resid, - std::ostream& os, double tol, int rvec, bool cholB, - int disp, int maxit) + std::ostream& os, double tol, int rvec, + bool /* cholB */, int disp, int maxit) { std::string typ (_typ); bool have_sigma = (sigmar ? true : false); @@ -3302,8 +3302,8 @@ octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, ComplexColumnVector &cresid, std::ostream& os, - double tol, int rvec, bool cholB, int disp, - int maxit) + double tol, int rvec, bool /* cholB */, + int disp, int maxit) { std::string typ (_typ); bool have_sigma = (std::abs(sigma) ? true : false); diff -r 22462fd58e66 -r 095ae5e0a831 liboctave/idx-vector.cc --- a/liboctave/idx-vector.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/liboctave/idx-vector.cc Thu Feb 05 02:42:58 2009 -0500 @@ -589,7 +589,7 @@ } octave_idx_type -idx_vector::freeze (octave_idx_type z_len, const char *tag, bool resize_ok) +idx_vector::freeze (octave_idx_type z_len, const char *, bool resize_ok) { if (! resize_ok && extent (z_len) > z_len) { diff -r 22462fd58e66 -r 095ae5e0a831 src/ChangeLog --- a/src/ChangeLog Thu Feb 05 01:19:29 2009 -0500 +++ b/src/ChangeLog Thu Feb 05 02:42:58 2009 -0500 @@ -1,5 +1,25 @@ 2009-02-05 John W. Eaton + * variables.cc (Vignore_function_time_stamp): + Eliminate unused static variable. + + * debug.cc (get_file_line): Override default precedence in logical + expression. + + * ov-null-mat.cc (default_null_str_numeric_conversion_function, + default_null_sq_str_numeric_conversion_function, + default_null_matrix_numeric_conversion_function): + Avoid unused variable warning. + + * ov-flt-re-diag.cc (octave_float_diag_matrix::save_binary): + Avoid unused parameter warning. + * pt-eval.cc (tree_evaluator::visit_if_clause): Likewise. + * ov-typeinfo.cc (octave_value_typeinfo::do_register_type): Likewise. + * ov-base.cc (octave_base_value::subsref (const std::string&, + const std::list&, bool): Likewise. + * ov-flt-cx-diag.cc (octave_float_complex_diag_matrix::save_binary): + Likewise. + * oct-hdf5.h: New file. * ls-hdf5.cc, ov-base.h, ov.h: Include oct-hdf5.h instead of hdf5.h. * ls-hdf5.h: Include oct-hdf5.h. diff -r 22462fd58e66 -r 095ae5e0a831 src/debug.cc --- a/src/debug.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/src/debug.cc Thu Feb 05 02:42:58 2009 -0500 @@ -153,7 +153,7 @@ size_t bol = offsets[line]; size_t eol = offsets[line+1]; - while (eol > 0 && buf[eol-1] == '\n' || buf[eol-1] == '\r') + while (eol > 0 && (buf[eol-1] == '\n' || buf[eol-1] == '\r')) eol--; retval = buf.substr (bol, eol - bol); diff -r 22462fd58e66 -r 095ae5e0a831 src/ov-base.cc --- a/src/ov-base.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/src/ov-base.cc Thu Feb 05 02:42:58 2009 -0500 @@ -97,7 +97,7 @@ octave_value octave_base_value::subsref (const std::string& type, const std::list& idx, - bool auto_add) + bool /* auto_add */) { // This way we may get a more meaningful error message. return subsref (type, idx); diff -r 22462fd58e66 -r 095ae5e0a831 src/ov-flt-cx-diag.cc --- a/src/ov-flt-cx-diag.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/src/ov-flt-cx-diag.cc Thu Feb 05 02:42:58 2009 -0500 @@ -145,7 +145,7 @@ bool octave_float_complex_diag_matrix::save_binary (std::ostream& os, - bool& save_as_floats) + bool& /* save_as_floats */) { int32_t r = matrix.rows (), c = matrix.cols (); diff -r 22462fd58e66 -r 095ae5e0a831 src/ov-flt-re-diag.cc --- a/src/ov-flt-re-diag.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/src/ov-flt-re-diag.cc Thu Feb 05 02:42:58 2009 -0500 @@ -115,7 +115,8 @@ } bool -octave_float_diag_matrix::save_binary (std::ostream& os, bool& save_as_floats) +octave_float_diag_matrix::save_binary (std::ostream& os, + bool& /* save_as_floats*/) { int32_t r = matrix.rows (), c = matrix.cols (); diff -r 22462fd58e66 -r 095ae5e0a831 src/ov-null-mat.cc --- a/src/ov-null-mat.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/src/ov-null-mat.cc Thu Feb 05 02:42:58 2009 -0500 @@ -35,7 +35,8 @@ static octave_base_value * default_null_matrix_numeric_conversion_function (const octave_base_value& a) { - CAST_CONV_ARG (const octave_null_matrix&); + // The cast is not necessary? + // CAST_CONV_ARG (const octave_null_matrix&); return a.empty_clone (); } @@ -54,7 +55,8 @@ static octave_base_value * default_null_str_numeric_conversion_function (const octave_base_value& a) { - CAST_CONV_ARG (const octave_null_str&); + // The cast is not necessary? + // CAST_CONV_ARG (const octave_null_str&); return a.empty_clone (); } @@ -73,7 +75,8 @@ static octave_base_value * default_null_sq_str_numeric_conversion_function (const octave_base_value& a) { - CAST_CONV_ARG (const octave_null_sq_str&); + // The cast is not necessary? + // CAST_CONV_ARG (const octave_null_sq_str&); return a.empty_clone (); } diff -r 22462fd58e66 -r 095ae5e0a831 src/ov-typeinfo.cc --- a/src/ov-typeinfo.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/src/ov-typeinfo.cc Thu Feb 05 02:42:58 2009 -0500 @@ -211,7 +211,7 @@ int octave_value_typeinfo::do_register_type (const std::string& t_name, - const std::string& c_name, + const std::string& /* c_name */, const octave_value& val) { int i = 0; diff -r 22462fd58e66 -r 095ae5e0a831 src/pt-eval.cc --- a/src/pt-eval.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/src/pt-eval.cc Thu Feb 05 02:42:58 2009 -0500 @@ -510,7 +510,7 @@ } void -tree_evaluator::visit_if_clause (tree_if_clause& tic) +tree_evaluator::visit_if_clause (tree_if_clause&) { panic_impossible (); } diff -r 22462fd58e66 -r 095ae5e0a831 src/variables.cc --- a/src/variables.cc Thu Feb 05 01:19:29 2009 -0500 +++ b/src/variables.cc Thu Feb 05 02:42:58 2009 -0500 @@ -61,10 +61,6 @@ #include "utils.h" #include "variables.h" -// Should Octave always check to see if function files have changed -// since they were last compiled? -static int Vignore_function_time_stamp = 1; - // Defines layout for the whos/who -long command static std::string Vwhos_line_format = " %a:4; %ln:6; %cs:16:6:1; %rb:12; %lc:-1;\n";