summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gran <spk121@yahoo.com>2009-08-12 08:50:12 -0700
committerMichael Gran <spk121@yahoo.com>2009-08-12 08:50:45 -0700
commitbd4911efd239a0a09d3deb5c8dec0b727fff86ef (patch)
tree1952bb4cf5812b7cccb5a025c30c765c05557d7c
parent94ff26b96b555f0263fab2221cd55801119ffddd (diff)
downloadguile-bd4911efd239a0a09d3deb5c8dec0b727fff86ef.tar.gz
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
-rw-r--r--libguile/ports.c4
-rw-r--r--libguile/strings.c2
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;