Mercurial > octave
changeset 26357:bba4b338757d stable
data.cc: Fix static analyzer detected issues (bug #55347).
* data.cc (Fall, Fany): Call args(1).xint_value()
rather than incorrect version without prepended 'x'.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 01 Jan 2019 21:26:13 -0800 |
parents | 768945ca2ff2 |
children | d527c6111425 |
files | libinterp/corefcn/data.cc |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/data.cc Tue Jan 01 21:13:34 2019 -0800 +++ b/libinterp/corefcn/data.cc Tue Jan 01 21:26:13 2019 -0800 @@ -101,7 +101,7 @@ print_usage (); int dim = (nargin == 1 ? -1 - : args(1).int_value ("all: DIM must be an integer")-1); + : args(1).xint_value ("all: DIM must be an integer")-1); if (dim < -1) error ("all: invalid dimension argument = %d", dim + 1); @@ -166,7 +166,7 @@ print_usage (); int dim = (nargin == 1 ? -1 - : args(1).int_value ("any: DIM must be an integer")-1); + : args(1).xint_value ("any: DIM must be an integer")-1); if (dim < -1) error ("any: invalid dimension argument = %d", dim + 1); @@ -1135,7 +1135,7 @@ { SparseMatrix cs = arg.sparse_matrix_value ().cumsum (dim); if (isnative) - retval = cs != 0.0; + retval = (cs != 0.0); else retval = cs; } @@ -1143,7 +1143,7 @@ { NDArray cs = arg.array_value ().cumsum (dim); if (isnative) - retval = cs != 0.0; + retval = (cs != 0.0); else retval = cs; }