changeset 20893:384ff5aa9437

2015 Code Sprint: Eliminate useless return statements after error (). * data.cc, graphics.cc, graphics.in.h, ls-mat4.cc, ls-mat5.cc, oct-fstrm.cc, oct-stream.cc, oct-strstrm.cc, __delaunayn__.cc, ov-base-int.cc, ov-classdef.h, ov-complex.cc, ov-cx-sparse.cc, ov-fcn-inline.cc, ov-float.cc, ov-flt-complex.cc, ov-java.cc, ov-range.cc, ov-re-sparse.cc, ov-scalar.cc, ov-struct.cc, ov-usr-fcn.cc, ov.cc, op-cm-cm.cc, op-cm-m.cc, op-cm-scm.cc, op-cm-sm.cc, op-fcm-fcm.cc, op-fcm-fm.cc, op-fm-fcm.cc, op-fm-fm.cc, op-m-cm.cc, op-m-m.cc, op-m-scm.cc, op-m-sm.cc, op-scm-cm.cc, op-scm-m.cc, op-scm-scm.cc, op-scm-sm.cc, op-sm-cm.cc, op-sm-m.cc, op-sm-scm.cc, op-sm-sm.cc, pt-exp.cc: Eliminate useless return statements after error ().
author Rik <rik@octave.org>
date Mon, 14 Dec 2015 12:59:29 -0800
parents c07bee629973
children e528d7ab1cad
files libinterp/corefcn/data.cc libinterp/corefcn/graphics.cc libinterp/corefcn/graphics.in.h libinterp/corefcn/ls-mat4.cc libinterp/corefcn/ls-mat5.cc libinterp/corefcn/oct-fstrm.cc libinterp/corefcn/oct-stream.cc libinterp/corefcn/oct-strstrm.cc libinterp/dldfcn/__delaunayn__.cc libinterp/octave-value/ov-base-int.cc libinterp/octave-value/ov-classdef.h libinterp/octave-value/ov-complex.cc libinterp/octave-value/ov-cx-sparse.cc libinterp/octave-value/ov-fcn-inline.cc libinterp/octave-value/ov-float.cc libinterp/octave-value/ov-flt-complex.cc libinterp/octave-value/ov-java.cc libinterp/octave-value/ov-range.cc libinterp/octave-value/ov-re-sparse.cc libinterp/octave-value/ov-scalar.cc libinterp/octave-value/ov-struct.cc libinterp/octave-value/ov-usr-fcn.cc libinterp/octave-value/ov.cc libinterp/operators/op-cm-cm.cc libinterp/operators/op-cm-m.cc libinterp/operators/op-cm-scm.cc libinterp/operators/op-cm-sm.cc libinterp/operators/op-fcm-fcm.cc libinterp/operators/op-fcm-fm.cc libinterp/operators/op-fm-fcm.cc libinterp/operators/op-fm-fm.cc libinterp/operators/op-m-cm.cc libinterp/operators/op-m-m.cc libinterp/operators/op-m-scm.cc libinterp/operators/op-m-sm.cc libinterp/operators/op-scm-cm.cc libinterp/operators/op-scm-m.cc libinterp/operators/op-scm-scm.cc libinterp/operators/op-scm-sm.cc libinterp/operators/op-sm-cm.cc libinterp/operators/op-sm-m.cc libinterp/operators/op-sm-scm.cc libinterp/operators/op-sm-sm.cc libinterp/parse-tree/pt-exp.cc
diffstat 44 files changed, 78 insertions(+), 240 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/data.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/corefcn/data.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -2061,11 +2061,7 @@
           for (int i = 1; i < args.length (); i++)
             {
               if (! (dv.*concat_rule) (args(i).dims (), dim))
-                {
-                  // Dimensions do not match.
-                  error ("cat: dimension mismatch");
-                  return retval;
-                }
+                error ("cat: dimension mismatch");
             }
 
           // The lines below might seem crazy, since we take a copy
@@ -5349,10 +5345,7 @@
       Array<octave_idx_type> new_size = args(1).octave_idx_type_vector_value ();
 
       if (new_size.numel () < 2)
-        {
-          error ("reshape: SIZE must have 2 or more dimensions");
-          return retval;
-        }
+        error ("reshape: SIZE must have 2 or more dimensions");
 
       new_dims = dim_vector::alloc (new_size.numel ());
 
@@ -6725,10 +6718,7 @@
       else if (mode == "descend")
         smode = DESCENDING;
       else
-        {
           error ("__sort_rows_idx__: MODE must be either \"ascend\" or \"descend\"");
-          return retval;
-        }
     }
 
   octave_value arg = args(0);
@@ -7671,10 +7661,7 @@
     {
       octave_idx_type k = rep(1, i);
       if (k < 0)
-        {
-          error ("repelems: second row must contain non-negative numbers");
-          return retval;
-        }
+        error ("repelems: second row must contain non-negative numbers");
 
       l += k;
     }
@@ -7736,10 +7723,7 @@
         {
           octave_idx_type rx = rm(i);
           if (static_cast<double> (rx) != rm(i))
-            {
-              error ("repelems: R must be a matrix of integers");
-              return retval;
-            }
+            error ("repelems: R must be a matrix of integers");
 
           r(i) = rx;
         }
--- a/libinterp/corefcn/graphics.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/corefcn/graphics.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -2997,12 +2997,9 @@
     all_props.find (pname);
 
   if (it == all_props.end ())
-    {
-      error ("get_property: unknown property \"%s\"", pname.c_str ());
-      return property ();
-    }
-  else
-    return it->second;
+    error ("get_property: unknown property \"%s\"", pname.c_str ());
+    
+  return it->second;
 }
 
 void
@@ -11653,10 +11650,7 @@
   graphics_handle handle = gh_manager::lookup (h);
 
   if (! handle.ok ())
-    {
-      error ("__zoom__: invalid handle");
-      return retval;
-    }
+    error ("__zoom__: invalid handle");
 
   graphics_object ax = gh_manager::get_object (handle);
 
--- a/libinterp/corefcn/graphics.in.h	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/corefcn/graphics.in.h	Mon Dec 14 12:59:29 2015 -0800
@@ -64,28 +64,24 @@
 
   virtual ~base_scaler (void) { }
 
-  virtual Matrix scale (const Matrix& m) const
+  virtual Matrix scale (const Matrix&) const
   {
     error ("invalid axis scale");
-    return m;
-  }
-
-  virtual NDArray scale (const NDArray& m) const
+  }
+
+  virtual NDArray scale (const NDArray&) const
   {
     error ("invalid axis scale");
-    return m;
-  }
-
-  virtual double scale (double d) const
+  }
+
+  virtual double scale (double) const
   {
     error ("invalid axis scale");
-    return d;
-  }
-
-  virtual double unscale (double d) const
+  }
+
+  virtual double unscale (double) const
   {
     error ("invalid axis scale");
-    return d;
   }
 
   virtual base_scaler* clone () const
@@ -316,20 +312,17 @@
   virtual octave_value get (void) const
   {
     error ("get: invalid property \"%s\"", name.c_str ());
-    return octave_value ();
   }
 
 
   virtual std::string values_as_string (void) const
   {
     error ("values_as_string: invalid property \"%s\"", name.c_str ());
-    return std::string ();
   }
 
   virtual Cell values_as_cell (void) const
   {
     error ("values_as_cell: invalid property \"%s\"", name.c_str ());
-    return Cell ();
   }
 
   base_property& operator = (const octave_value& val)
@@ -404,7 +397,6 @@
   virtual bool do_set (const octave_value&)
   {
     error ("set: invalid property \"%s\"", name.c_str ());
-    return false;
   }
 
 private:
@@ -2736,7 +2728,6 @@
     else
       {
         error ("base_graphics_object::get: invalid graphics object");
-        return octave_value ();
       }
   }
 
@@ -2747,7 +2738,6 @@
     else
       {
         error ("base_graphics_object::get: invalid graphics object");
-        return octave_value ();
       }
   }
 
@@ -2758,7 +2748,6 @@
   virtual octave_value get_defaults (void) const
   {
     error ("base_graphics_object::get_defaults: invalid graphics object");
-    return octave_value ();
   }
 
   virtual property_list get_defaults_list (void) const
@@ -2771,13 +2760,11 @@
   virtual octave_value get_factory_defaults (void) const
   {
     error ("base_graphics_object::get_factory_defaults: invalid graphics object");
-    return octave_value ();
   }
 
   virtual property_list get_factory_defaults_list (void) const
   {
     error ("base_graphics_object::get_factory_defaults_list: invalid graphics object");
-    return property_list ();
   }
 
   virtual bool has_readonly_property (const caseless_str& pname) const
@@ -2798,7 +2785,6 @@
     else
       {
         error ("base_graphics_object::get_parent: invalid graphics object");
-        return graphics_handle ();
       }
   }
 
@@ -2809,7 +2795,6 @@
     else
       {
         error ("base_graphics_object::get_handle: invalid graphics object");
-        return graphics_handle ();
       }
   }
 
@@ -2852,14 +2837,12 @@
   {
     static base_properties properties;
     error ("base_graphics_object::get_properties: invalid graphics object");
-    return properties;
   }
 
   virtual const base_properties& get_properties (void) const
   {
     static base_properties properties;
     error ("base_graphics_object::get_properties: invalid graphics object");
-    return properties;
   }
 
   virtual void update_axis_limits (const std::string& axis_type);
@@ -2889,7 +2872,6 @@
     else
       {
         error ("base_graphics_object::get_toolkit: invalid graphics object");
-        return graphics_toolkit ();
       }
   }
 
--- a/libinterp/corefcn/ls-mat4.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/corefcn/ls-mat4.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -399,9 +399,10 @@
     return retval;
   }
 
+// FIXME: With short-circuiting error(), no need for goto in code
 data_read_error:
   error ("load: trouble reading binary file '%s'", filename.c_str ());
-  return retval;
+
 }
 
 // Save the data from TC along with the corresponding NAME on stream OS
--- a/libinterp/corefcn/ls-mat5.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/corefcn/ls-mat5.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -1465,9 +1465,9 @@
 
   return retval;
 
+// FIXME: With short-circuiting error(), no need for goto in code
 data_read_error:
   error ("load: trouble reading binary file '%s'", filename.c_str ());
-  return std::string ();
 
 skip_ahead:
   warning ("load: skipping over '%s'", retval.c_str ());
@@ -2682,8 +2682,8 @@
 skip_to_next:
   return true;
 
+// FIXME: With short-circuiting error(), no need for goto in code
 error_cleanup:
   error ("save: error while writing '%s' to MAT file", name.c_str ());
 
-  return false;
 }
--- a/libinterp/corefcn/oct-fstrm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/corefcn/oct-fstrm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -65,7 +65,6 @@
 octave_fstream::seek (off_t, int)
 {
   error ("fseek: invalid_operation");
-  return -1;
 }
 
 // Return current stream position.
@@ -74,7 +73,6 @@
 octave_fstream::tell (void)
 {
   error ("ftell: invalid_operation");
-  return -1;
 }
 
 // Return nonzero if EOF has been reached on this stream.
--- a/libinterp/corefcn/oct-stream.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/corefcn/oct-stream.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -2609,8 +2609,6 @@
 
         default:
           error ("%s: invalid format specifier", who.c_str ());
-          return -1;
-          break;
         }
     }
 
--- a/libinterp/corefcn/oct-strstrm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/corefcn/oct-strstrm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -32,7 +32,6 @@
 octave_base_strstream::seek (off_t, int)
 {
   error ("fseek: invalid operation");
-  return -1;
 }
 
 // Return current stream position.
@@ -41,7 +40,6 @@
 octave_base_strstream::tell (void)
 {
   error ("ftell: invalid operation");
-  return -1;
 }
 
 octave_stream
--- a/libinterp/dldfcn/__delaunayn__.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/dldfcn/__delaunayn__.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -74,10 +74,7 @@
       int maxval = std::numeric_limits<int>::max ();
 
       if (dim > maxval || n > maxval)
-        {
-          error ("%s: dimension too large for Qhull", who);
-          return false;
-        }
+        error ("%s: dimension too large for Qhull", who);
     }
 
   return true;
--- a/libinterp/octave-value/ov-base-int.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-base-int.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -508,11 +508,9 @@
 octave_base_int_scalar<T>::load_ascii (std::istream& is)
 {
   is >> this->scalar;
-  if (!is)
-    {
-      error ("load: failed to load scalar constant");
-      return false;
-    }
+  if (! is)
+    error ("load: failed to load scalar constant");
+
   return true;
 }
 
--- a/libinterp/octave-value/ov-classdef.h	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-classdef.h	Mon Dec 14 12:59:29 2015 -0800
@@ -412,13 +412,10 @@
   {
     Cell val = map.contents (pname);
 
-    if (val.numel () > 0)
-      return val(0, 0);
-    else
-      {
+    if (val.numel () < 1)
         error ("get: unknown slot: %s", pname.c_str ());
-        return octave_value ();
-      }
+
+    return val(0, 0);
   }
 
   octave_value_list
@@ -547,7 +544,6 @@
                 int /* nargout */)
   {
     error ("subsref: invalid meta object");
-    return octave_value_list ();
   }
 
   virtual void meta_release (void) { }
@@ -1510,27 +1506,19 @@
 inline cdef_object
 to_cdef (const octave_value& val)
 {
-  if (val.type_name () == "object")
-    return dynamic_cast<octave_classdef *> (val.internal_rep ())->get_object ();
-  else
-    {
-      error ("cannot convert `%s' into `object'", val.type_name().c_str ());
-      return cdef_object ();
-    }
+  if (val.type_name () != "object")
+    error ("cannot convert `%s' into `object'", val.type_name().c_str ());
+
+  return dynamic_cast<octave_classdef *> (val.internal_rep ())->get_object ();
 }
 
 inline cdef_object&
 to_cdef_ref (const octave_value& val)
 {
-  static cdef_object empty;
+  if (val.type_name () != "object")
+    error ("cannot convert `%s' into `object'", val.type_name().c_str ());
 
-  if (val.type_name () == "object")
-    return dynamic_cast<octave_classdef *> (val.internal_rep ())->get_object_ref ();
-  else
-    {
-      error ("cannot convert `%s' into `object'", val.type_name().c_str ());
-      return empty;
-    }
+  return dynamic_cast<octave_classdef *> (val.internal_rep ())->get_object_ref ();
 }
 
 inline cdef_object
--- a/libinterp/octave-value/ov-complex.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-complex.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -311,11 +311,8 @@
 {
   scalar = octave_read_value<Complex> (is);
 
-  if (!is)
-    {
-      error ("load: failed to load complex scalar constant");
-      return false;
-    }
+  if (! is)
+    error ("load: failed to load complex scalar constant");
 
   return true;
 }
--- a/libinterp/octave-value/ov-cx-sparse.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-cx-sparse.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -308,10 +308,7 @@
     swap_bytes<4> (&tmp);
 
   if (tmp != -2)
-    {
-      error ("load: only 2-D sparse matrices are supported");
-      return false;
-    }
+    error ("load: only 2-D sparse matrices are supported");
 
   if (! is.read (reinterpret_cast<char *> (&nr), 4))
     return false;
--- a/libinterp/octave-value/ov-fcn-inline.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-fcn-inline.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -780,30 +780,22 @@
   else if (nargin == 2 && args(1).is_numeric_type ())
     {
       if (! args(1).is_scalar_type ())
-        {
-          error ("inline: N must be an integer");
-          return retval;
-        }
+        error ("inline: N must be an integer");
 
       int n = args(1).int_value ("inline: N must be an integer");
 
-      if (n >= 0)
-        {
-          fargs.resize (n+1);
+      if (n < 0)
+        error ("inline: N must be a positive integer or zero");
 
-          fargs(0) = "x";
+      fargs.resize (n+1);
 
-          for (int i = 1; i < n+1; i++)
-            {
-              std::ostringstream buf;
-              buf << "P" << i;
-              fargs(i) = buf.str ();
-            }
-        }
-      else
+      fargs(0) = "x";
+
+      for (int i = 1; i < n+1; i++)
         {
-          error ("inline: N must be a positive integer or zero");
-          return retval;
+          std::ostringstream buf;
+          buf << "P" << i;
+          fargs(i) = buf.str ();
         }
     }
   else
--- a/libinterp/octave-value/ov-float.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-float.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -147,11 +147,8 @@
 octave_float_scalar::load_ascii (std::istream& is)
 {
   scalar = octave_read_value<float> (is);
-  if (!is)
-    {
-      error ("load: failed to load scalar constant");
-      return false;
-    }
+  if (! is)
+    error ("load: failed to load scalar constant");
 
   return true;
 }
--- a/libinterp/octave-value/ov-flt-complex.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-flt-complex.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -255,11 +255,8 @@
 {
   scalar = octave_read_value<FloatComplex> (is);
 
-  if (!is)
-    {
-      error ("load: failed to load complex scalar constant");
-      return false;
-    }
+  if (! is)
+    error ("load: failed to load complex scalar constant");
 
   return true;
 }
--- a/libinterp/octave-value/ov-java.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-java.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -2089,7 +2089,6 @@
   return retval;
 #else
   error ("__java_init__: Octave was not compiled with Java interface");
-  return octave_value ();
 #endif
 }
 
@@ -2458,7 +2457,6 @@
   return SET_INTERNAL_VARIABLE (java_unsigned_autoconversion);
 #else
   error ("java_unsigned_autoconversion: Octave was not compiled with Java interface");
-  return octave_value ();
 #endif
 }
 
@@ -2481,7 +2479,6 @@
   return SET_INTERNAL_VARIABLE (debug_java);
 #else
   error ("debug_java: Octave was not compiled with Java interface");
-  return octave_value ();
 #endif
 }
 
--- a/libinterp/octave-value/ov-range.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-range.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -472,11 +472,8 @@
   double base, limit, inc;
   is >> base >> limit >> inc;
 
-  if (!is)
-    {
-      error ("load: failed to load range constant");
-      return false;
-    }
+  if (! is)
+    error ("load: failed to load range constant");
 
   if (inc != 0)
     range = Range (base, limit, inc);
--- a/libinterp/octave-value/ov-re-sparse.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-re-sparse.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -339,10 +339,7 @@
     swap_bytes<4> (&tmp);
 
   if (tmp != -2)
-    {
-      error ("load: only 2-D sparse matrices are supported");
-      return false;
-    }
+    error ("load: only 2-D sparse matrices are supported");
 
   if (! is.read (reinterpret_cast<char *> (&nr), 4))
     return false;
--- a/libinterp/octave-value/ov-scalar.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-scalar.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -162,11 +162,9 @@
 octave_scalar::load_ascii (std::istream& is)
 {
   scalar = octave_read_value<double> (is);
-  if (!is)
-    {
-      error ("load: failed to load scalar constant");
-      return false;
-    }
+
+  if (! is)
+    error ("load: failed to load scalar constant");
 
   return true;
 }
--- a/libinterp/octave-value/ov-struct.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-struct.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -280,10 +280,7 @@
   octave_value t_rhs = rhs;
 
   if (idx.front ().empty ())
-    {
-      error ("missing index in indexed assignment");
-      return retval;
-    }
+    error ("missing index in indexed assignment");
 
   if (n > 1 && ! (type.length () == 2 && type[0] == '(' && type[1] == '.'))
     {
@@ -1168,10 +1165,7 @@
   octave_value retval;
 
   if (idx.front ().empty ())
-    {
-      error ("missing index in indexed assignment");
-      return retval;
-    }
+    error ("missing index in indexed assignment");
 
   if (type[0] == '.')
     {
@@ -1755,10 +1749,7 @@
   for (int i = 0; i < nargin; i += 2)
     {
       if (! args(i).is_string () || i + 1 >= nargin)
-        {
-          error ("struct: additional arguments must occur as \"field\", VALUE pairs");
-          return retval;
-        }
+        error ("struct: additional arguments must occur as \"field\", VALUE pairs");
     }
 
   // Check that the dimensions of the values correspond.
@@ -2009,16 +2000,10 @@
     print_usage ();
 
   if (! args(0).is_cell ())
-    {
-      error ("cell2struct: argument CELL must be of type cell");
-      return retval;
-    }
+    error ("cell2struct: argument CELL must be of type cell");
 
   if (! (args(1).is_cellstr () || args(1).is_char_matrix ()))
-    {
-      error ("cell2struct: FIELDS must be a cell array of strings or a character matrix");
-      return retval;
-    }
+    error ("cell2struct: FIELDS must be a cell array of strings or a character matrix");
 
   const Cell vals = args(0).cell_value ();
   const Array<std::string> fields = args(1).cellstr_value ();
@@ -2029,28 +2014,19 @@
 
   if (nargin == 3)
     {
-      if (args(2).is_real_scalar ())
-        dim = nargin == 2 ? 0 : args(2).int_value () - 1;
-      else
-        {
-          error ("cell2struct: DIM must be a real scalar");
-          return retval;
-        }
+      if (! args(2).is_real_scalar ())
+        error ("cell2struct: DIM must be a real scalar");
+
+      dim = nargin == 2 ? 0 : args(2).int_value () - 1;
     }
 
   if (dim < 0)
-    {
-      error ("cell2struct: DIM must be a valid dimension");
-      return retval;
-    }
+    error ("cell2struct: DIM must be a valid dimension");
 
   ext = vals.ndims () > dim ? vals.dims ()(dim) : 1;
 
   if (ext != fields.numel ())
-    {
-      error ("cell2struct: number of FIELDS does not match dimension");
-      return retval;
-    }
+    error ("cell2struct: number of FIELDS does not match dimension");
 
   int nd = std::max (dim+1, vals.ndims ());
   // result dimensions.
--- a/libinterp/octave-value/ov-usr-fcn.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov-usr-fcn.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -115,11 +115,7 @@
 octave_user_script::subsref (const std::string&,
                              const std::list<octave_value_list>&, int)
 {
-  octave_value_list retval;
-
   error ("invalid use of script %s in index expression", file_name.c_str ());
-
-  return retval;
 }
 
 octave_value_list
@@ -505,10 +501,7 @@
   call_depth++;
 
   if (call_depth >= Vmax_recursion_depth)
-    {
-      error ("max_recursion_depth exceeded");
-      return retval;
-    }
+    error ("max_recursion_depth exceeded");
 
   // Save old and set current symbol table context, for
   // eval_undefined_error().
@@ -841,10 +834,7 @@
           std::string name = func.string_value ();
           func = symbol_table::find_function (name);
           if (func.is_undefined ())
-            {
-              error ("nargin: invalid function name: %s", name.c_str ());
-              return retval;
-            }
+            error ("nargin: invalid function name: %s", name.c_str ());
         }
 
       octave_function *fcn_val = func.function_value ();
@@ -952,10 +942,7 @@
           std::string name = func.string_value ();
           func = symbol_table::find_function (name);
           if (func.is_undefined ())
-            {
-              error ("nargout: invalid function name: %s", name.c_str ());
-              return retval;
-            }
+            error ("nargout: invalid function name: %s", name.c_str ());
         }
 
       if (func.is_inline_function ())
@@ -1048,12 +1035,9 @@
 static bool isargout1 (int nargout, const Matrix& ignored, double k)
 {
   if (k != xround (k) || k <= 0)
-    {
-      error ("isargout: K must be a positive integer");
-      return false;
-    }
-  else
-    return (k == 1 || k <= nargout) && ! val_in_table (ignored, k);
+    error ("isargout: K must be a positive integer");
+  
+  return (k == 1 || k <= nargout) && ! val_in_table (ignored, k);
 }
 
 DEFUN (isargout, args, ,
--- a/libinterp/octave-value/ov.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/octave-value/ov.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -2970,10 +2970,7 @@
           else if (item == ".")
             type_string[k] = '.';
           else
-            {
-              error ("%s: invalid indexing type '%s'", name, item.c_str ());
-              return;
-            }
+            error ("%s: invalid indexing type '%s'", name, item.c_str ());
 
           octave_value_list idx_item;
 
@@ -2993,10 +2990,7 @@
                 }
             }
           else
-            {
-              error ("%s: subs(%d) must be a string or cell array", name, k+1);
-              return;
-            }
+            error ("%s: subs(%d) must be a string or cell array", name, k+1);
 
           idx.push_back (idx_item);
         }
--- a/libinterp/operators/op-cm-cm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-cm-cm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -89,7 +89,6 @@
 DEFBINOPX (pow, complex_matrix, complex_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, complex_matrix, complex_matrix)
--- a/libinterp/operators/op-cm-m.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-cm-m.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -73,7 +73,6 @@
 DEFBINOPX (pow, complex_matrix, matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, complex_matrix, matrix)
--- a/libinterp/operators/op-cm-scm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-cm-scm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -75,7 +75,6 @@
 DEFBINOPX (pow, complex_matrix, sparse_complex_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, complex_matrix, sparse_complex_matrix)
--- a/libinterp/operators/op-cm-sm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-cm-sm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -74,7 +74,6 @@
 DEFBINOPX (pow, complex_matrix, sparse_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, complex_matrix, sparse_matrix)
--- a/libinterp/operators/op-fcm-fcm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-fcm-fcm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -90,7 +90,6 @@
 DEFBINOPX (pow, float_complex_matrix, float_complex_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, float_complex_matrix, float_complex_matrix)
--- a/libinterp/operators/op-fcm-fm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-fcm-fm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -79,7 +79,6 @@
 DEFBINOPX (pow, float_complex_matrix, float_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, float_complex_matrix, float_matrix)
--- a/libinterp/operators/op-fm-fcm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-fm-fcm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -78,7 +78,6 @@
 DEFBINOPX (pow, float_matrix, float_complex_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, float_matrix, float_complex_matrix)
--- a/libinterp/operators/op-fm-fm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-fm-fm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -77,7 +77,6 @@
 DEFBINOPX (pow, float_matrix, float_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, float_matrix, float_matrix)
--- a/libinterp/operators/op-m-cm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-m-cm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -74,7 +74,6 @@
 DEFBINOPX (pow, matrix, complex_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, matrix, complex_matrix)
--- a/libinterp/operators/op-m-m.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-m-m.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -76,7 +76,6 @@
 DEFBINOPX (pow, matrix, matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, matrix, matrix)
--- a/libinterp/operators/op-m-scm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-m-scm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -75,7 +75,6 @@
 DEFBINOPX (pow, matrix, sparse_complex_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, matrix, sparse_complex_matrix)
--- a/libinterp/operators/op-m-sm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-m-sm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -73,7 +73,6 @@
 DEFBINOPX (pow, matrix, sparse_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, matrix, sparse_matrix)
--- a/libinterp/operators/op-scm-cm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-scm-cm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -62,7 +62,6 @@
 DEFBINOPX (pow, sparse_complex_matrix, complex_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, sparse_complex_matrix, complex_matrix)
--- a/libinterp/operators/op-scm-m.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-scm-m.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -63,7 +63,6 @@
 DEFBINOPX (pow, sparse_complex_matrix, matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, sparse_complex_matrix, matrix)
--- a/libinterp/operators/op-scm-scm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-scm-scm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -123,7 +123,6 @@
 DEFBINOPX (pow, sparse_complex_matrix, sparse_complex_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, sparse_complex_matrix, sparse_complex_matrix)
--- a/libinterp/operators/op-scm-sm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-scm-sm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -73,7 +73,6 @@
 DEFBINOPX (pow, sparse_complex_matrix, sparse_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, sparse_complex_matrix, sparse_matrix)
--- a/libinterp/operators/op-sm-cm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-sm-cm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -62,7 +62,6 @@
 DEFBINOPX (pow, sparse_matrix, complex_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, sparse_matrix, complex_matrix)
--- a/libinterp/operators/op-sm-m.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-sm-m.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -60,7 +60,6 @@
 DEFBINOPX (pow, sparse_matrix, matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, sparse_matrix, matrix)
--- a/libinterp/operators/op-sm-scm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-sm-scm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -73,7 +73,6 @@
 DEFBINOPX (pow, sparse_matrix, sparse_complex_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, sparse_matrix, sparse_complex_matrix)
--- a/libinterp/operators/op-sm-sm.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/operators/op-sm-sm.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -97,7 +97,6 @@
 DEFBINOPX (pow, sparse_matrix, sparse_matrix)
 {
   error ("can't do A ^ B for A and B both matrices");
-  return octave_value ();
 }
 
 DEFBINOP (ldiv, sparse_matrix, sparse_matrix)
--- a/libinterp/parse-tree/pt-exp.cc	Mon Dec 14 11:28:48 2015 -0800
+++ b/libinterp/parse-tree/pt-exp.cc	Mon Dec 14 12:59:29 2015 -0800
@@ -55,14 +55,12 @@
 tree_expression::rvalue1 (int)
 {
   error ("invalid rvalue function called in expression");
-  return octave_value ();
 }
 
 octave_value_list
 tree_expression::rvalue (int)
 {
   error ("invalid rvalue function called in expression");
-  return octave_value_list ();
 }
 
 octave_value_list
@@ -75,7 +73,6 @@
 tree_expression::lvalue (void)
 {
   error ("invalid lvalue function called in expression");
-  return octave_lvalue ();
 }
 
 std::string