changeset 26382:2408f3b6a6db stable

ov-intx.h: Fix static analyzer detected issues (bug #55347). * ov-intx.h (double_value, float_value): Declare retval, but don't do unnecessary initialization.
author Rik <rik@octave.org>
date Wed, 02 Jan 2019 14:59:44 -0800
parents 3c5a676cd95b
children 5455de7c8566
files libinterp/octave-value/ov-intx.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/ov-intx.h	Wed Jan 02 23:49:10 2019 +0100
+++ b/libinterp/octave-value/ov-intx.h	Wed Jan 02 14:59:44 2019 -0800
@@ -107,7 +107,7 @@
   double
   double_value (bool = false) const
   {
-    double retval = lo_ieee_nan_value ();
+    double retval;
 
     if (isempty ())
       err_invalid_conversion (type_name (), "real scalar");
@@ -123,7 +123,7 @@
   float
   float_value (bool = false) const
   {
-    float retval = lo_ieee_float_nan_value ();
+    float retval;
 
     if (isempty ())
       err_invalid_conversion (type_name (), "real scalar");