diff libinterp/corefcn/xpow.cc @ 21024:6176560b03d9

maint: Remove return stmts after gripe function calls. * gripes.h: Mark gripe functions which call error() wwith GCC_ATTR_NORETURN. * jit-typeinfo.cc (gripe_bad_result): Mark function with GCC_ATTR_NORETURN. * load-save.cc (gripe_file_open): Mark function with GCC_ATTR_NORETURN. * ov-base.cc (gripe_indexed_assignment, gripe_assign_conversion_failed, gripe_no_conversion): Mark functions with GCC_ATTR_NORETURN. * ov-class.cc (gripe_invalid_index1, gripe_invalid_index_for_assignment, gripe_invalid_index_type): Mark functions with GCC_ATTR_NORETURN. * ov-classdef.h (gripe_invalid_object): Mark function with GCC_ATTR_NORETURN. * ov.cc (gripe_cat_op, gripe_cat_op_conv): Mark functions with GCC_ATTR_NORETURN. * balance.cc, det.cc, eig.cc, hess.cc, inv.cc, jit-typeinfo.cc, load-save.cc, qz.cc, schur.cc, sparse-xdiv.cc, sparse-xpow.cc, sylvester.cc, xdiv.cc, xpow.cc, symrcm.cc, ov-base.cc, ov-classdef.h, ov-cs-list.cc, ov-flt-re-mat.cc, ov-re-mat.cc, ov-re-sparse.cc, ov.cc, op-int.h, op-fs-fs.cc, ops.h: Remove statements that occur after a gripe function which does not return. * op-cs-cs.cc, op-dms-template.cc, op-fcs-fcs.cc, op-s-s.cc : Add newline between gripe and return statement for readability.
author Rik <rik@octave.org>
date Fri, 01 Jan 2016 13:58:45 -0800
parents b9d4c3615e89
children 5e00ed38a58b
line wrap: on
line diff
--- a/libinterp/corefcn/xpow.cc	Thu Dec 31 17:06:36 2015 -0500
+++ b/libinterp/corefcn/xpow.cc	Fri Jan 01 13:58:45 2016 -0800
@@ -813,10 +813,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   int convert_to_complex = 0;
   for (octave_idx_type j = 0; j < nc; j++)
@@ -896,10 +893,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   ComplexMatrix result (nr, nc);
 
@@ -1037,10 +1031,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   ComplexMatrix result (nr, nc);
 
@@ -1088,10 +1079,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   ComplexMatrix result (nr, nc);
 
@@ -1273,10 +1261,7 @@
             return octave_value (bsxfun_pow (xa, xb));
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   int len = a.numel ();
@@ -1355,10 +1340,7 @@
           return bsxfun_pow (a, b);
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   ComplexNDArray result (a_dims);
@@ -1454,10 +1436,7 @@
           return bsxfun_pow (a, b);
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   ComplexNDArray result (a_dims);
@@ -1504,10 +1483,7 @@
           return bsxfun_pow (a, b);
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   ComplexNDArray result (a_dims);
@@ -2219,10 +2195,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   int convert_to_complex = 0;
   for (octave_idx_type j = 0; j < nc; j++)
@@ -2302,10 +2275,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   FloatComplexMatrix result (nr, nc);
 
@@ -2403,10 +2373,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   FloatComplexMatrix result (nr, nc);
 
@@ -2454,10 +2421,7 @@
   octave_idx_type b_nc = b.cols ();
 
   if (nr != b_nr || nc != b_nc)
-    {
-      gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
-      return octave_value ();
-    }
+    gripe_nonconformant ("operator .^", nr, nc, b_nr, b_nc);
 
   FloatComplexMatrix result (nr, nc);
 
@@ -2639,10 +2603,7 @@
             return octave_value (bsxfun_pow (xa, xb));
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   int len = a.numel ();
@@ -2721,10 +2682,7 @@
           return bsxfun_pow (a, b);
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   FloatComplexNDArray result (a_dims);
@@ -2820,10 +2778,7 @@
           return bsxfun_pow (a, b);
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   FloatComplexNDArray result (a_dims);
@@ -2870,10 +2825,7 @@
           return bsxfun_pow (a, b);
         }
       else
-        {
-          gripe_nonconformant ("operator .^", a_dims, b_dims);
-          return octave_value ();
-        }
+        gripe_nonconformant ("operator .^", a_dims, b_dims);
     }
 
   FloatComplexNDArray result (a_dims);