* patch submission to fix compiler warning if glib.h is included in project
@ 2021-11-23 18:28 Hannes Müller
0 siblings, 0 replies; only message in thread
From: Hannes Müller @ 2021-11-23 18:28 UTC (permalink / raw)
To: guile-devel
[-- Attachment #1: Type: text/plain, Size: 65 bytes --]
Hi,
Please consider to appy the attached patch.
Thanks
Hannes
[-- Attachment #2: 0001-Fix-warning-if-libguile-is-used-with-compile-option-.patch --]
[-- Type: text/x-patch, Size: 1237 bytes --]
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-23 18:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 18:28 patch submission to fix compiler warning if glib.h is included in project Hannes Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).