changeset 26414:8e39c5a22bc2 stable

ov-struct.cc: Fix static analyzer detected issues (bug #55347). * ov-struct.cc (Fcell2struct): Delete useless test for nargin == 2 when it has already been determined to be 3.
author Rik <rik@octave.org>
date Thu, 03 Jan 2019 15:06:49 -0800
parents 05ce565644bd
children f553b02e13c6
files libinterp/octave-value/ov-struct.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/ov-struct.cc	Thu Jan 03 15:00:01 2019 -0800
+++ b/libinterp/octave-value/ov-struct.cc	Thu Jan 03 15:06:49 2019 -0800
@@ -2024,7 +2024,7 @@
       if (! args(2).is_real_scalar ())
         error ("cell2struct: DIM must be a real scalar");
 
-      dim = (nargin == 2 ? 0 : args(2).int_value () - 1);
+      dim = args(2).int_value () - 1;
     }
 
   if (dim < 0)