Mercurial > octave
changeset 28448:97a8ec57c33e stable
Avoid shadowing warnings.
* libinterp/corefcn/ls-oct-binary.cc (load_inline_fcn): Avoid warning about
shadowed local variable.
* libinterp/corefcn/ov-fcn-handle.cc (simple_fcn_handle): Avoid warning about
shadowed parameter.
(anonymous_fcn_handle::parse): Avoid warning about shadowed member function.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 11 Jun 2020 14:20:49 +0200 |
parents | 3ed7e4f3ccc1 |
children | a68e892970d0 d0f5f42e2cf7 |
files | libinterp/corefcn/ls-oct-binary.cc libinterp/octave-value/ov-fcn-handle.cc |
diffstat | 2 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/ls-oct-binary.cc Thu Jun 11 12:53:24 2020 +0200 +++ b/libinterp/corefcn/ls-oct-binary.cc Thu Jun 11 14:20:49 2020 +0200 @@ -116,11 +116,11 @@ octave::interpreter& interp = octave::__get_interpreter__ ("load_inline_fcn"); - octave_value_list tmp = interp.feval ("inline", args, 1); + octave_value_list tmp_inl = interp.feval ("inline", args, 1); - if (tmp.length () > 0) + if (tmp_inl.length () > 0) { - retval = tmp(0); + retval = tmp_inl(0); return true; } }
--- a/libinterp/octave-value/ov-fcn-handle.cc Thu Jun 11 12:53:24 2020 +0200 +++ b/libinterp/octave-value/ov-fcn-handle.cc Thu Jun 11 14:20:49 2020 +0200 @@ -176,10 +176,10 @@ { if (m_fcn.is_defined ()) { - octave_function *fcn = m_fcn.function_value (); - - if (fcn) - m_file = fcn->fcn_file_name (); + octave_function *oct_fcn = m_fcn.function_value (); + + if (oct_fcn) + m_file = oct_fcn->fcn_file_name (); } } @@ -2394,13 +2394,13 @@ unwind_action act ([&tw] () { tw.pop_scope (); }); int parse_status; - octave_value anonymous_fcn_handle + octave_value anonymous_fcn_hdl = interp.eval_string (fcn_text, true, parse_status); if (parse_status != 0) return false; - octave_fcn_handle *fh = anonymous_fcn_handle.fcn_handle_value (); + octave_fcn_handle *fh = anonymous_fcn_hdl.fcn_handle_value (); if (! fh) return false;