# HG changeset patch # User Rik # Date 1669932076 28800 # Node ID 9ecc95d840ca382fb8245890dc1112cfd2d60419 # Parent 16fb0e3e6aabd1390a3cd4b86ca9ac1f97266821# Parent 23520a50d74d795d1ce942afeb23a1c548a2e355 maint: merge stable to default diff -r 16fb0e3e6aab -r 9ecc95d840ca libinterp/corefcn/__ftp__.cc --- a/libinterp/corefcn/__ftp__.cc Thu Dec 01 15:04:44 2022 -0500 +++ b/libinterp/corefcn/__ftp__.cc Thu Dec 01 14:01:16 2022 -0800 @@ -102,10 +102,8 @@ Undocumented internal function @end deftypefn */) { - int nargin = args.length (); - std::string path = ""; - if (nargin > 1) + if (args.length () > 1) path = args(1).xstring_value ("__ftp_cwd__: PATH must be a string"); url_handle_manager& uhm = interp.get_url_handle_manager (); @@ -415,13 +413,11 @@ Undocumented internal function @end deftypefn */) { - int nargin = args.length (); - std::string file = args(1).xstring_value ("__ftp_mget__: PATTERN must be a string"); std::string target; - if (nargin == 3 && ! args(2).isempty ()) + if (args.length () == 3 && ! args(2).isempty ()) target = args(2).xstring_value ("__ftp_mget__: TARGET must be a string") + sys::file_ops::dir_sep_str (); diff -r 16fb0e3e6aab -r 9ecc95d840ca libinterp/corefcn/__isprimelarge__.cc --- a/libinterp/corefcn/__isprimelarge__.cc Thu Dec 01 15:04:44 2022 -0500 +++ b/libinterp/corefcn/__isprimelarge__.cc Thu Dec 01 14:01:16 2022 -0800 @@ -155,8 +155,7 @@ @seealso{isprime, factor} @end deftypefn */) { - int nargin = args.length (); - if (nargin != 1) + if (args.length () != 1) print_usage (); // This function is intended for internal use by isprime.m, @@ -260,8 +259,7 @@ @seealso{isprime, factor} @end deftypefn */) { - int nargin = args.length (); - if (nargin != 1) + if (args.length () != 1) print_usage (); octave_uint64 inp = args(0).xuint64_scalar_value diff -r 16fb0e3e6aab -r 9ecc95d840ca libinterp/corefcn/data.cc --- a/libinterp/corefcn/data.cc Thu Dec 01 15:04:44 2022 -0500 +++ b/libinterp/corefcn/data.cc Thu Dec 01 14:01:16 2022 -0800 @@ -4189,7 +4189,6 @@ default: // FIXME: It shouldn't be possible to ever reach this. error ("%s: invalid class name for sparse", fcn); - break; } return retval; diff -r 16fb0e3e6aab -r 9ecc95d840ca libinterp/corefcn/debug.cc --- a/libinterp/corefcn/debug.cc Thu Dec 01 15:04:44 2022 -0500 +++ b/libinterp/corefcn/debug.cc Thu Dec 01 14:01:16 2022 -0800 @@ -302,8 +302,6 @@ octave::bp_table::bp_lines lines; std::string dummy; // "if" condition -- only used for dbstop - int nargin = args.length (); - octave::tree_evaluator& tw = interp.get_evaluator (); octave::bp_table& bptab = tw.get_bp_table (); @@ -311,7 +309,7 @@ bptab.parse_dbfunction_params ("dbclear", args, symbol_name, class_name, lines, dummy); - if (nargin == 1 && symbol_name == "all") + if (args.length () == 1 && symbol_name == "all") { bptab.remove_all_breakpoints (); bptab.dbclear_all_signals (); diff -r 16fb0e3e6aab -r 9ecc95d840ca libinterp/corefcn/file-io.cc --- a/libinterp/corefcn/file-io.cc Thu Dec 01 15:04:44 2022 -0500 +++ b/libinterp/corefcn/file-io.cc Thu Dec 01 14:01:16 2022 -0800 @@ -2903,9 +2903,7 @@ @seealso{P_tmpdir, tempname, mkstemp, tmpfile} @end deftypefn */) { - int nargin = args.length (); - - if (nargin > 0) + if (args.length () > 0) print_usage (); std::string tmpdir = sys::env::get_temp_directory (); diff -r 16fb0e3e6aab -r 9ecc95d840ca libinterp/corefcn/qr.cc --- a/libinterp/corefcn/qr.cc Thu Dec 01 15:04:44 2022 -0500 +++ b/libinterp/corefcn/qr.cc Thu Dec 01 14:01:16 2022 -0800 @@ -321,8 +321,8 @@ bool economy = false; bool is_cmplx = false; - bool have_b = 0; - bool vector_p = 0; + bool have_b = false; + bool vector_p = false; if (arg.iscomplex ()) is_cmplx = true; diff -r 16fb0e3e6aab -r 9ecc95d840ca libinterp/dldfcn/__ode15__.cc --- a/libinterp/dldfcn/__ode15__.cc Thu Dec 01 15:04:44 2022 -0500 +++ b/libinterp/dldfcn/__ode15__.cc Thu Dec 01 14:01:16 2022 -0800 @@ -633,7 +633,7 @@ ColumnVector ie, te, oldval, oldisterminal, olddir; Matrix output, ye; octave_idx_type cont = 0, temp = 0; - bool status = 0; + bool status = false; std::string string = ""; ColumnVector yold = y; @@ -800,7 +800,7 @@ ColumnVector& yold, const octave_idx_type num_event_args) { - bool status = 0; + bool status = false; octave_value_list args; if (num_event_args == 2) @@ -915,7 +915,7 @@ const octave_idx_type num_event_args) { realtype h = 0, tcur = 0; - bool status = 0; + bool status = false; N_Vector dky = N_VNew_Serial (m_num OCTAVE_SUNCONTEXT); @@ -978,7 +978,7 @@ realtype tend, ColumnVector& outputsel, const std::string& flag) { - bool status = 0; + bool status = false; octave_value_list output; output(2) = flag;