mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +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:
parent
b7c1b60c83
commit
6f82b8f623
1 changed files with 5 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue