# HG changeset patch # User Rik # Date 1657042721 25200 # Node ID 18b8f73595e0d77a3b6ff786ea39c146c0900982 # Parent 46e15523ca06f876e648ad34bba6e815e63fca7e Suppress warning for inline() when used intentionally in core Octave (bug #62682). * fplot.m, __ezplot__.m: Temporarily suppress warning for "Octave:legacy-function" so that intentional use of inline() does not produce a confusing warning. diff -r 46e15523ca06 -r 18b8f73595e0 scripts/plot/draw/fplot.m --- a/scripts/plot/draw/fplot.m Tue Jul 05 08:57:15 2022 -0700 +++ b/scripts/plot/draw/fplot.m Tue Jul 05 10:38:41 2022 -0700 @@ -101,6 +101,8 @@ fcn = varargin{1}; if (isa (fcn, "inline")) + ## Don't warn about intentional use of inline functions (Bug #62682) + warning ("off", "Octave:legacy-function", "local"); fcn = vectorize (inline (fcn)); nam = formula (fcn); elseif (is_function_handle (fcn)) @@ -108,6 +110,8 @@ elseif (all (isalnum (fcn))) nam = fcn; elseif (ischar (fcn)) + ## Don't warn about intentional use of inline functions (Bug #62682) + warning ("off", "Octave:legacy-function", "local"); fcn = vectorize (inline (fcn)); nam = formula (fcn); else diff -r 46e15523ca06 -r 18b8f73595e0 scripts/plot/draw/private/__ezplot__.m --- a/scripts/plot/draw/private/__ezplot__.m Tue Jul 05 08:57:15 2022 -0700 +++ b/scripts/plot/draw/private/__ezplot__.m Tue Jul 05 10:38:41 2022 -0700 @@ -76,6 +76,8 @@ parametric = false; fcn = varargin{1}; + ## Don't warn about intentional use of inline functions (Bug #62682) + warning ("off", "Octave:legacy-function", "local"); if (ischar (fcn)) if (exist (fcn, "file") || exist (fcn, "builtin")) fcn = str2func (fcn); # convert to function handle