1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

(NUM2INTEGRAL): Avoid warning about conditional

always being false by inserting preprocessor conditional.  (Thanks
to Bruce Korb.)
This commit is contained in:
Mikael Djurfeldt 2003-05-22 10:22:20 +00:00
parent 6898c703ef
commit a502595f05
2 changed files with 6 additions and 0 deletions

View file

@ -1,5 +1,9 @@
2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
* num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
always being false by inserting preprocessor conditional. (Thanks
to Bruce Korb.)
* __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
(void *) in order to avoid an aliasing warning; thanks to Bruce
Korb.)

View file

@ -59,6 +59,7 @@ NUM2INTEGRAL (SCM num, unsigned long int pos, const char *s_caller)
return (ITYPE) n;
else
{
#if SIZEOF_SCM_T_BITS > SIZEOF_ITYPE
/* an inum can be out of range, so check */
if (UNSIGNED) /* n is known to be >= 0 */
{
@ -67,6 +68,7 @@ NUM2INTEGRAL (SCM num, unsigned long int pos, const char *s_caller)
}
else if (((ITYPE) n) != n)
scm_out_of_range (s_caller, num);
#endif
return (ITYPE) n;
}
}