summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2013-08-10 11:47:54 -0400
committerMark H Weaver <mhw@netris.org>2013-08-10 11:53:23 -0400
commit6f82b8f62321269d5bb71679951d5e0595f81d2d (patch)
tree978c01bd4df63acac5b49e15265ec7f9825f8a54
parentb7c1b60c83098abf83c39b724e4e96eae8478c53 (diff)
downloadguile-6f82b8f62321269d5bb71679951d5e0595f81d2d.tar.gz
Fix inappropriate uses of scm_syserror in numbers.c.
* libguile/numbers.c (mem2ureal, left_shift_exact_integer, floor_right_shift_exact_integer, round_right_shift_exact_integer): Use 'assert' instead of 'scm_syserror' to indicate a case that should never happen.
-rw-r--r--libguile/numbers.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libguile/numbers.c b/libguile/numbers.c
index b9e453a63..6f3a6ec46 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -48,6 +48,7 @@
#endif
#include <verify.h>
+#include <assert.h>
#include <math.h>
#include <string.h>
@@ -5005,7 +5006,7 @@ left_shift_exact_integer (SCM n, long count)
return result;
}
else
- scm_syserror ("left_shift_exact_integer");
+ assert (0);
}
/* Efficiently compute floor (N / 2^COUNT),
@@ -5031,7 +5032,7 @@ floor_right_shift_exact_integer (SCM n, long count)
return scm_i_normbig (result);
}
else
- scm_syserror ("floor_right_shift_exact_integer");
+ assert (0);
}
/* Efficiently compute round (N / 2^COUNT),
@@ -5069,7 +5070,7 @@ round_right_shift_exact_integer (SCM n, long count)
return scm_i_normbig (q);
}
else
- scm_syserror ("round_right_shift_exact_integer");
+ assert (0);
}
SCM_DEFINE (scm_ash, "ash", 2, 0, 0,
@@ -6200,7 +6201,7 @@ mem2ureal (SCM mem, unsigned int *p_idx,
}
/* We should never get here */
- scm_syserror ("mem2ureal");
+ assert (0);
}