1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-28 16:00:22 +02:00

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.
This commit is contained in:
Mark H Weaver 2013-08-10 11:47:54 -04:00
parent b7c1b60c83
commit 6f82b8f623

View file

@ -48,6 +48,7 @@
#endif #endif
#include <verify.h> #include <verify.h>
#include <assert.h>
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
@ -5005,7 +5006,7 @@ left_shift_exact_integer (SCM n, long count)
return result; return result;
} }
else else
scm_syserror ("left_shift_exact_integer"); assert (0);
} }
/* Efficiently compute floor (N / 2^COUNT), /* Efficiently compute floor (N / 2^COUNT),
@ -5031,7 +5032,7 @@ floor_right_shift_exact_integer (SCM n, long count)
return scm_i_normbig (result); return scm_i_normbig (result);
} }
else else
scm_syserror ("floor_right_shift_exact_integer"); assert (0);
} }
/* Efficiently compute round (N / 2^COUNT), /* Efficiently compute round (N / 2^COUNT),
@ -5069,7 +5070,7 @@ round_right_shift_exact_integer (SCM n, long count)
return scm_i_normbig (q); return scm_i_normbig (q);
} }
else else
scm_syserror ("round_right_shift_exact_integer"); assert (0);
} }
SCM_DEFINE (scm_ash, "ash", 2, 0, 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 */ /* We should never get here */
scm_syserror ("mem2ureal"); assert (0);
} }