Mercurial > octave
changeset 23604:b0e9c030f063
eliminate some warnings introduced by recent changes
* error.cc, help.cc, symtab.cc, symtab.h, variables.cc, pt-eval.cc:
Eliminate unused variable and deprecated function warnings.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 14 Jun 2017 14:19:56 -0400 |
parents | 18bd46c4b79a |
children | a64849340165 |
files | libinterp/corefcn/error.cc libinterp/corefcn/help.cc libinterp/corefcn/symtab.cc libinterp/corefcn/symtab.h libinterp/corefcn/variables.cc libinterp/parse-tree/pt-eval.cc |
diffstat | 6 files changed, 6 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/error.cc Wed Jun 14 11:45:47 2017 -0400 +++ b/libinterp/corefcn/error.cc Wed Jun 14 14:19:56 2017 -0400 @@ -1504,8 +1504,6 @@ if (nargin >= 2) arg2 = argv[2]; - octave::call_stack& cs = interp.get_call_stack (); - if (arg1 == "on" || arg1 == "off" || arg1 == "error") { octave_map old_warning_options = warning_options;
--- a/libinterp/corefcn/help.cc Wed Jun 14 11:45:47 2017 -0400 +++ b/libinterp/corefcn/help.cc Wed Jun 14 14:19:56 2017 -0400 @@ -160,11 +160,12 @@ if (! curr_fcn) return retval; - symbol_table& symtab = octave::__get_symbol_table__ ("local_functions"); - // All subfunctions are listed in the top-level function of this file. while (curr_fcn->is_subfunction ()) - curr_fcn = symtab.get_curr_fcn (curr_fcn->parent_fcn_scope ()); + { + symbol_table::scope *pscope = curr_fcn->parent_fcn_scope (); + curr_fcn = pscope->function (); + } // Get subfunctions. const std::list<std::string> names = curr_fcn->subfunction_names ();
--- a/libinterp/corefcn/symtab.cc Wed Jun 14 11:45:47 2017 -0400 +++ b/libinterp/corefcn/symtab.cc Wed Jun 14 14:19:56 2017 -0400 @@ -111,9 +111,6 @@ symbol_table::symbol_record::symbol_record_rep * symbol_table::symbol_record::symbol_record_rep::dup (scope *new_scope) const { - symbol_table& symtab - = octave::__get_symbol_table__ ("symbol_table::symbol_record::symbol_record_rep::dup"); - return new symbol_record_rep (new_scope, name, varval (), storage_class); } @@ -121,9 +118,6 @@ symbol_table::symbol_record::symbol_record_rep::dump (std::ostream& os, const std::string& prefix) const { - symbol_table& symtab - = octave::__get_symbol_table__ ("symbol_table::symbol_record::symbol_record_rep::dump"); - octave_value val = varval (); os << prefix << name;
--- a/libinterp/corefcn/symtab.h Wed Jun 14 11:45:47 2017 -0400 +++ b/libinterp/corefcn/symtab.h Wed Jun 14 14:19:56 2017 -0400 @@ -1859,7 +1859,7 @@ return retval; } - OCTAVE_DEPRECATED ("use 'get_scope' with 'get_curr_fcn (name)' instead") + OCTAVE_DEPRECATED ("use 'get_scope' with 'function ()' instead") octave_user_function * get_curr_fcn (scope *sid) { return sid ? sid->function () : 0;
--- a/libinterp/corefcn/variables.cc Wed Jun 14 11:45:47 2017 -0400 +++ b/libinterp/corefcn/variables.cc Wed Jun 14 14:19:56 2017 -0400 @@ -1190,11 +1190,9 @@ is_global (sr.is_global ()), is_persistent (sr.is_persistent ()) { - symbol_table& symtab = octave::__get_symbol_table__ ("symbol_info"); - varval = (expr_val.is_undefined () ? sr.varval () : expr_val); - is_complex = varval.is_complex_type (); + is_complex = varval.iscomplex (); } void display_line (std::ostream& os,
--- a/libinterp/parse-tree/pt-eval.cc Wed Jun 14 11:45:47 2017 -0400 +++ b/libinterp/parse-tree/pt-eval.cc Wed Jun 14 14:19:56 2017 -0400 @@ -984,9 +984,6 @@ symbol_table::symbol_reference sym = expr.symbol (); - symbol_table::scope *scope = __get_current_scope__ ("visitor"); - symbol_table::context_id context = scope ? scope->current_context () : 0; - octave_value val = sym->find (); if (val.is_defined ())