From bd4911efd239a0a09d3deb5c8dec0b727fff86ef Mon Sep 17 00:00:00 2001 From: Michael Gran Date: Wed, 12 Aug 2009 08:50:12 -0700 Subject: [PATCH] Some signed/unsigned comparison and conversions * libguile/ports.c (scm_lfwrite_str, scm_lfwrite_substr): signed/unsigned conversion and comparison * libguile/strings.c (scm_string_append): signed/unsigned comparison --- libguile/ports.c | 4 ++-- libguile/strings.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libguile/ports.c b/libguile/ports.c index 4ed5f76d7..f51ab0032 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -1019,7 +1019,7 @@ scm_lfwrite_substr (SCM str, size_t start, size_t end, SCM port) if (pt->rw_active == SCM_PORT_READ) scm_end_input (port); - if (end == -1) + if (end == (size_t) (-1)) end = size; size = end - start; @@ -1042,7 +1042,7 @@ scm_lfwrite_substr (SCM str, size_t start, size_t end, SCM port) void scm_lfwrite_str (SCM str, SCM port) { - scm_lfwrite_substr (str, 0, -1, port); + scm_lfwrite_substr (str, 0, (size_t) (-1), port); } /* scm_c_read diff --git a/libguile/strings.c b/libguile/strings.c index 74cebd69b..2e766c28c 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -1297,7 +1297,7 @@ SCM_DEFINE (scm_string_append, "string-append", 0, 0, 1, size_t len = 0; int wide = 0; SCM l, s; - int i; + size_t i; union { char *narrow;