Wheat vs. Chaff

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Wheat vs. Chaff

Rik-4
I started taking a look at the static analyzer results
(https://wiki.octave.org/PVS_static_analyzer_-_5.0_Release).  There is a
lot of chaff, but some kernels of wheat amongst the results.  For example,
I just fixed __eigs__.cc which had this issue.

__eigs__.cc (117)  The string literal is implicitly cast to the bool type.
Inspect the first argument.

As it turned out, for want of a single letter 'x' we were calling the wrong
function and this was definitely a good find.

       if (tmp.length () && tmp(0).is_defined ())
         {
-          retval = tmp(0).complex_vector_value ("eigs: evaluation of
user-supplied function failed");
+          retval = tmp(0).xcomplex_vector_value ("eigs: evaluation of
user-supplied function failed");
         }

--Rik