Sync with v1.9.5
[gitweb.git] / utf8.c
diff --git a/utf8.c b/utf8.c
index 015c8157eda650450f8dfc9bb744959056d10e9b..a89704017a0997fd93ba14f198eb3e199d0f4274 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -5,8 +5,8 @@
 /* This code is originally from http://www.cl.cam.ac.uk/~mgk25/ucs/ */
 
 struct interval {
-  int first;
-  int last;
+       ucs_char_t first;
+       ucs_char_t last;
 };
 
 size_t display_mode_esc_sequence_len(const char *s)
@@ -528,7 +528,7 @@ char *reencode_string_iconv(const char *in, size_t insz, iconv_t conv, int *outs
        while (1) {
                size_t cnt = iconv(conv, &cp, &insz, &outpos, &outsz);
 
-               if (cnt == -1) {
+               if (cnt == (size_t) -1) {
                        size_t sofar;
                        if (errno != E2BIG) {
                                free(out);