diff libinterp/corefcn/toplev.cc @ 20831:35241c4b696c

eliminate return statements after calls to error * Cell.cc, __ichol__.cc, __lin_interpn__.cc, __pchip_deriv__.cc, besselj.cc, cellfun.cc, colloc.cc, debug.cc, dlmread.cc, dynamic-ld.cc, filter.cc, find.cc, gl2ps-renderer.cc, load-path.cc, load-save.cc, ls-mat4.cc, ls-mat5.cc, ls-oct-text.cc, luinc.cc, max.cc, nproc.cc, oct-hist.cc, oct-map.cc, oct-obj.cc, oct-stream.cc, ordschur.cc, pinv.cc, pr-output.cc, profiler.cc, psi.cc, quadcc.cc, qz.cc, rand.cc, strfind.cc, strfns.cc, sysdep.cc, toplev.cc, tril.cc, typecast.cc, urlwrite.cc, utils.cc, variables.cc: Eliminate return statements after calls to error.
author John W. Eaton <jwe@octave.org>
date Wed, 09 Dec 2015 14:00:43 -0500
parents c349d4c91ce2
children 1142cf6abc0d
line wrap: on
line diff
--- a/libinterp/corefcn/toplev.cc	Tue Dec 08 17:41:32 2015 -0800
+++ b/libinterp/corefcn/toplev.cc	Wed Dec 09 14:00:43 2015 -0500
@@ -1045,10 +1045,7 @@
       else if (type_str == "async")
         type = et_async;
       else
-        {
-          error ("system: TYPE must be \"sync\" or \"async\"");
-          return retval;
-        }
+        error ("system: TYPE must be \"sync\" or \"async\"");
     }
 
   if (nargin > 1)
@@ -1064,10 +1061,7 @@
     }
 
   if (return_output && type == et_async)
-    {
-      error ("system: can't return output from commands run asynchronously");
-      return retval;
-    }
+    error ("system: can't return output from commands run asynchronously");
 
   std::string cmd_str = args(0).xstring_value ("system: first argument must be a string");