Mercurial > hg > octave-jordi
changeset 9702:9ecd35a606e3
avoid some warnings from g++
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 07 Oct 2009 10:59:46 -0400 |
parents | 531280b07625 |
children | 9a5598cf899d |
files | liboctave/ChangeLog liboctave/mx-inlines.cc src/ChangeLog src/ov-flt-re-mat.cc src/pt-arg-list.cc src/pt-cbinop.cc |
diffstat | 6 files changed, 19 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,7 @@ +2009-10-07 John W. Eaton <jwe@octave.org> + + * mx-inlines.cc (mx_inline_diff): Avoid uninitialized variable warning. + 2009-10-06 Jaroslav Hajek <highegg@gmail.com> * dDiagMatrix.cc (operator *(const DiagMatrix&, const DiagMatrix&)):
--- a/liboctave/mx-inlines.cc +++ b/liboctave/mx-inlines.cc @@ -951,10 +951,9 @@ r[i] = v[i+1] - v[i]; break; case 2: - { - T lst; - if (n > 1) - lst = v[1] - v[0]; + if (n > 1) + { + T lst = v[1] - v[0]; for (octave_idx_type i = 0; i < n-2; i++) { T dif = v[i+2] - v[i+1];
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2009-10-07 John W. Eaton <jwe@octave.org> + + * pt-arg-list.cc (tree_argument_list::convert_to_const_vector): + Avoid uninitialized variable warning. + * pt-cbinop.cc (simplify_ldiv_op): Avoid unused parameter warning. + * ov-flt-re-mat.cc (convert_to_str_internal): + Update for octave_value constructor changes. + 2009-10-07 Jaroslav Hajek <highegg@gmail.com> * oct-stream.cc (octave_base_stream::skipl,
--- a/src/ov-flt-re-mat.cc +++ b/src/ov-flt-re-mat.cc @@ -307,7 +307,7 @@ } } - retval = octave_value (chm, true, type); + retval = octave_value (chm, type); return retval; }
--- a/src/pt-arg-list.cc +++ b/src/pt-arg-list.cc @@ -163,12 +163,10 @@ && ! (object->is_function () || object->is_function_handle ())); - unwind_protect::frame_id_t uwp_frame; + unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame (); if (stash_object) { - uwp_frame = unwind_protect::begin_frame (); - unwind_protect::protect_var (indexed_object); indexed_object = object; @@ -217,8 +215,7 @@ } } - if (stash_object) - unwind_protect::run_frame (uwp_frame); + unwind_protect::run_frame (uwp_frame); return args; }
--- a/src/pt-cbinop.cc +++ b/src/pt-cbinop.cc @@ -109,7 +109,7 @@ // Possibly convert left division to trans_ldiv or herm_ldiv. static octave_value::compound_binary_op -simplify_ldiv_op (tree_expression *&a, tree_expression *&b) +simplify_ldiv_op (tree_expression *&a, tree_expression *&) { octave_value::compound_binary_op retop; octave_value::unary_op opa = strip_trans_herm (a);