Hi,

Please consider to appy the attached patch.

Thanks
Hannes 
From 6549b46942e8154e37ffbba3ad1ef88dc809e7a3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hannes=20M=C3=BCller?= <>
Date: Tue, 23 Nov 2021 18:38:05 +0100
Subject: [PATCH] Fix warning if libguile is used with compile option
 -Wsign-conversion

Avoid a warning if glib.h is included in a code project using compile option
-Wsign-conversion
---
 libguile/array-handle.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libguile/array-handle.h b/libguile/array-handle.h
index 6ad80eb41..ae62df48e 100644
--- a/libguile/array-handle.h
+++ b/libguile/array-handle.h
@@ -105,7 +105,7 @@ scm_array_handle_ref (scm_t_array_handle *h, ssize_t p)
     /* catch overflow */
     scm_out_of_range (NULL, scm_from_ssize_t (p));
   /* perhaps should catch overflow here too */
-  return h->vref (h->vector, h->base + p);
+  return h->vref (h->vector, h->base + (size_t)p);
 }
 
 SCM_INLINE_IMPLEMENTATION void
@@ -115,7 +115,7 @@ scm_array_handle_set (scm_t_array_handle *h, ssize_t p, SCM v)
     /* catch overflow */
     scm_out_of_range (NULL, scm_from_ssize_t (p));
   /* perhaps should catch overflow here too */
-  h->vset (h->vector, h->base + p, v);
+  h->vset (h->vector, h->base + (size_t)p, v);
 }
 
 #endif
-- 
2.30.2

Reply via email to