changeset 26425:6bfed6e4e9e9 stable

lo-ieee.cc: Fix static analyzer detected issues (bug #55347). * lo-ieee.cc (octave_ieee_init): Use static keyword on initialized variable so that init code is executed just once.
author Rik <rik@octave.org>
date Fri, 04 Jan 2019 09:32:18 -0800
parents 6e698f4606db
children 3e43775ab21c
files liboctave/util/lo-ieee.cc
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/util/lo-ieee.cc	Sun Dec 30 13:28:18 2018 -0800
+++ b/liboctave/util/lo-ieee.cc	Fri Jan 04 09:32:18 2019 -0800
@@ -130,7 +130,7 @@
 void
 octave_ieee_init (void)
 {
-  bool initialized = false;
+  static bool initialized = false;
 
   if (! initialized)
     {
@@ -180,7 +180,7 @@
           // floating point should be capable of removing this check and
           // the configure test.
           //
-          // If the the error handler returns, then we'll abort.
+          // If the error handler returns, then we'll abort.
 
           (*current_liboctave_error_handler)
             ("lo_ieee_init: floating point format is not IEEE!  Maybe DLAMCH is miscompiled, or you are using some strange system without IEEE floating point math?");