mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
(NUM2INTEGRAL): Avoid warning about conditional
always being false by inserting preprocessor conditional. (Thanks to Bruce Korb.)
This commit is contained in:
parent
6898c703ef
commit
a502595f05
2 changed files with 6 additions and 0 deletions
|
@ -1,5 +1,9 @@
|
||||||
2003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
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
|
* __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
|
||||||
(void *) in order to avoid an aliasing warning; thanks to Bruce
|
(void *) in order to avoid an aliasing warning; thanks to Bruce
|
||||||
Korb.)
|
Korb.)
|
||||||
|
|
|
@ -59,6 +59,7 @@ NUM2INTEGRAL (SCM num, unsigned long int pos, const char *s_caller)
|
||||||
return (ITYPE) n;
|
return (ITYPE) n;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if SIZEOF_SCM_T_BITS > SIZEOF_ITYPE
|
||||||
/* an inum can be out of range, so check */
|
/* an inum can be out of range, so check */
|
||||||
if (UNSIGNED) /* n is known to be >= 0 */
|
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)
|
else if (((ITYPE) n) != n)
|
||||||
scm_out_of_range (s_caller, num);
|
scm_out_of_range (s_caller, num);
|
||||||
|
#endif
|
||||||
return (ITYPE) n;
|
return (ITYPE) n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue