Added a sanity check to the unreachable branch in expt_zero().
authorArto Bendiken <arto@bendiken.net>
Tue, 14 Oct 2014 21:58:59 +0000 (21:58 +0000)
committerArto Bendiken <arto@bendiken.net>
Tue, 14 Oct 2014 21:58:59 +0000 (21:58 +0000)
This resolves CID 66441 (Missing return statement).

src/c/numbers/expt.d

index afa039d..1ec395e 100644 (file)
@@ -22,6 +22,8 @@
 #include <ecl/impl/math_fenv.h>
 #include <ecl/impl/math_dispatch.h>
 
+#include <stdlib.h> /* for abort() */
+
 #pragma STDC FENV_ACCESS ON
 
 cl_fixnum
@@ -81,7 +83,7 @@ expt_zero(cl_object x, cl_object y)
                 return ecl_make_complex(z, ecl_make_fixnum(0));
         default:
                 /* We will never reach this */
-                (void)0;
+                abort();
         }
 }