summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gran <spk121@yahoo.com>2009-08-11 22:52:49 -0700
committerMichael Gran <spk121@yahoo.com>2009-08-11 22:56:18 -0700
commit744c8724a7060abb7ad749f4db7eadb342184572 (patch)
tree971d96fee44d35c02ffa4cd301c074b88d4453da
parent9909c3956ae653488657c5909547dfd4b97557cc (diff)
downloadguile-744c8724a7060abb7ad749f4db7eadb342184572.tar.gz
Quiet signed/unsigned comparison warnings in chars.[ch]
* libguile/chars.h (SCM_MAKE_CHAR): quiet signed/unsigned comparison warnings * libguile/chars.c (scm_i_charname): (scm_i_charname_to_char): quiet signed/unsigned comparison warnings
-rw-r--r--libguile/chars.c4
-rw-r--r--libguile/chars.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/libguile/chars.c b/libguile/chars.c
index 56239f597..552a2d9c1 100644
--- a/libguile/chars.c
+++ b/libguile/chars.c
@@ -363,7 +363,7 @@ static const scm_t_uint32 const scm_alt_charnums[] = {
const char *
scm_i_charname (SCM chr)
{
- int c;
+ size_t c;
scm_t_uint32 i = SCM_CHAR (chr);
for (c = 0; c < SCM_N_R5RS_CHARNAMES; c++)
@@ -385,7 +385,7 @@ scm_i_charname (SCM chr)
SCM
scm_i_charname_to_char (const char *charname, size_t charname_len)
{
- int c;
+ size_t c;
/* The R5RS charnames. These are supposed to be case
insensitive. */
diff --git a/libguile/chars.h b/libguile/chars.h
index e016cb28e..51adc21e5 100644
--- a/libguile/chars.h
+++ b/libguile/chars.h
@@ -32,9 +32,9 @@
#define SCM_CHARP(x) (SCM_ITAG8(x) == scm_tc8_char)
#define SCM_CHAR(x) ((scm_t_wchar)SCM_ITAG8_DATA(x))
-#define SCM_MAKE_CHAR(x) \
- ((x) < 0 \
- ? SCM_MAKE_ITAG8 ((scm_t_bits) (unsigned char) (x), scm_tc8_char) \
+#define SCM_MAKE_CHAR(x) \
+ ((scm_t_int32) (x) < 0 \
+ ? SCM_MAKE_ITAG8 ((scm_t_bits) (unsigned char) (x), scm_tc8_char) \
: SCM_MAKE_ITAG8 ((scm_t_bits) (x), scm_tc8_char))
#define SCM_CODEPOINT_MAX (0x10ffff)