summaryrefslogtreecommitdiff
path: root/libguile/inline.h
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-10-14 23:20:54 +0200
committerLudovic Courtès <ludo@gnu.org>2009-10-14 23:20:54 +0200
commitc72b0ca3b076837a8a2b444fa7ab6d8c16b0b0c4 (patch)
tree67e4b923fddb8643de29d093a93cec69a3c6b10c /libguile/inline.h
parent5ebc8b81411ed261d66b9137e737cb9efe0e5aa8 (diff)
downloadguile-c72b0ca3b076837a8a2b444fa7ab6d8c16b0b0c4.tar.gz
Fix signed/unsigned mismatch in `scm_array_handle_{ref,set} ()'.
* libguile/inline.h (scm_array_handle_ref, scm_array_handle_set): Cast `h->base' so that it matches the signedness of `p'.
Diffstat (limited to 'libguile/inline.h')
-rw-r--r--libguile/inline.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/inline.h b/libguile/inline.h
index 93be809d1..a8f24d44f 100644
--- a/libguile/inline.h
+++ b/libguile/inline.h
@@ -243,7 +243,7 @@ SCM_C_EXTERN_INLINE
SCM
scm_array_handle_ref (scm_t_array_handle *h, ssize_t p)
{
- if (SCM_UNLIKELY (p < 0 && -p > h->base))
+ if (SCM_UNLIKELY (p < 0 && -p > (ssize_t) h->base))
/* catch overflow */
scm_out_of_range (NULL, scm_from_ssize_t (p));
/* perhaps should catch overflow here too */
@@ -256,7 +256,7 @@ SCM_C_EXTERN_INLINE
void
scm_array_handle_set (scm_t_array_handle *h, ssize_t p, SCM v)
{
- if (SCM_UNLIKELY (p < 0 && -p > h->base))
+ if (SCM_UNLIKELY (p < 0 && -p > (ssize_t) h->base))
/* catch overflow */
scm_out_of_range (NULL, scm_from_ssize_t (p));
/* perhaps should catch overflow here too */