changeset 28975:bbff46267cad

maint: Remove redundant never-executed statements following error() in libinterp/. * debug.cc, mex.cc, ov-fcn-handle.cc, ov-java.cc, ov-magic-int.cc, ov.cc: Remove redundant never-executed statements following error().
author Rik <rik@octave.org>
date Wed, 21 Oct 2020 15:53:32 -0700
parents c2db7bd05c00
children 4e1805033979
files libinterp/corefcn/debug.cc libinterp/corefcn/mex.cc libinterp/octave-value/ov-fcn-handle.cc libinterp/octave-value/ov-java.cc libinterp/octave-value/ov-magic-int.cc libinterp/octave-value/ov.cc
diffstat 6 files changed, 3 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/debug.cc	Wed Oct 21 14:33:14 2020 -0700
+++ b/libinterp/corefcn/debug.cc	Wed Oct 21 15:53:32 2020 -0700
@@ -222,10 +222,7 @@
                   && bkpt.cell_value () (0).isstruct ())
                 mv = bkpt.cell_value () (0).map_value ();
               else
-                {
-                  error ("dbstop: invalid 'bkpt' field");
-                  mv = octave_map ();
-                }
+                error ("dbstop: invalid 'bkpt' field");
             }
         }
       if (mv.isempty ())
@@ -235,7 +232,6 @@
       else if (! mv.isfield ("name") || ! mv.isfield ("line"))
         {
           error ("dbstop: Cell array must contain fields 'name' and 'line'");
-          retval = octave_value (0);
         }
       else
         {
--- a/libinterp/corefcn/mex.cc	Wed Oct 21 14:33:14 2020 -0700
+++ b/libinterp/corefcn/mex.cc	Wed Oct 21 15:53:32 2020 -0700
@@ -2301,7 +2301,6 @@
 
       case mxSINGLE_CLASS:
         error ("single precision sparse data type not supported");
-        break;
 
       default:
         panic_impossible ();
--- a/libinterp/octave-value/ov-fcn-handle.cc	Wed Oct 21 14:33:14 2020 -0700
+++ b/libinterp/octave-value/ov-fcn-handle.cc	Wed Oct 21 15:53:32 2020 -0700
@@ -598,7 +598,6 @@
       case '{':
       case '.':
         error ("function handle cannot be indexed with %c", type[0]);
-        break;
 
       default:
         panic_impossible ();
--- a/libinterp/octave-value/ov-java.cc	Wed Oct 21 14:33:14 2020 -0700
+++ b/libinterp/octave-value/ov-java.cc	Wed Oct 21 15:53:32 2020 -0700
@@ -746,7 +746,6 @@
 
         case JNI_EVERSION:
           error ("JVM internal error, the required JNI version is not supported");
-          break;
 
         case JNI_OK:
           // Don't do anything, the current thread is already attached to JVM
--- a/libinterp/octave-value/ov-magic-int.cc	Wed Oct 21 14:33:14 2020 -0700
+++ b/libinterp/octave-value/ov-magic-int.cc	Wed Oct 21 15:53:32 2020 -0700
@@ -216,12 +216,10 @@
 }
 
 template <typename T>
-bool
+OCTAVE_NORETURN bool
 octave_base_magic_int<T>::load_ascii (std::istream&)
 {
   error ("octave_base_magic_int<T>::load_ascii: internal error");
-
-  return false;
 }
 
 template <typename T>
@@ -234,13 +232,11 @@
 }
 
 template <typename T>
-bool
+OCTAVE_NORETURN bool
 octave_base_magic_int<T>::load_binary (std::istream&, bool,
                                        octave::mach_info::float_format)
 {
   error ("octave_base_magic_int<T>::load_binary: internal error");
-
-  return false;
 }
 
 template <typename T>
--- a/libinterp/octave-value/ov.cc	Wed Oct 21 14:33:14 2020 -0700
+++ b/libinterp/octave-value/ov.cc	Wed Oct 21 15:53:32 2020 -0700
@@ -2353,7 +2353,6 @@
         default:
           // We only expect to see numeric types explicitly requested.
           error ("mex_get_data: unexpected type requested");
-          break;
         }
 
       if (! type_ok)