changeset 15866:c1c6502fe52b

oct-rand.cc: Silence compiler warning about possible uninitialized variable. * liboctave/numeric/oct-rand.cc(do_float_scalar): initialize dretval to stop compiler warning.
author Rik <rik@octave.org>
date Sat, 29 Dec 2012 08:15:04 -0800
parents 500650d6ddf5
children 704e15f8fecd
files liboctave/numeric/oct-rand.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/numeric/oct-rand.cc	Fri Dec 28 22:43:18 2012 -0700
+++ b/liboctave/numeric/oct-rand.cc	Sat Dec 29 08:15:04 2012 -0800
@@ -427,7 +427,7 @@
   if (use_old_generators)
     {
       double da = a;
-      double dretval;
+      double dretval = 0.0;
       switch (current_distribution)
         {
         case uniform_dist: