aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-part-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-mime-part-utils.c')
-rw-r--r--camel/camel-mime-part-utils.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
index 131667e696..65c99c6dc8 100644
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@ -101,10 +101,11 @@ static GByteArray *
convert_buffer (GByteArray *in, const char *to, const char *from)
{
iconv_t ic;
- int inlen, outlen, i=2;
+ size_t inlen, outlen;
char *inbuf, *outbuf;
char *buffer;
GByteArray *out = NULL;
+ int i = 2;
d(printf("converting buffer from %s to %s: '%.*s'\n", from, to, (int)in->len, in->data));
@@ -123,7 +124,7 @@ convert_buffer (GByteArray *in, const char *to, const char *from)
inlen = in->len;
outbuf = buffer;
- if (e_iconv(ic, (const char **)&inbuf, &inlen, &outbuf, &outlen) == -1) {
+ if (e_iconv(ic, (const char **)&inbuf, &inlen, &outbuf, &outlen) == (size_t) -1) {
g_free(buffer);
g_warning("conversion failed: %s", strerror(errno));
/* we didn't have enough space */
@@ -140,7 +141,7 @@ convert_buffer (GByteArray *in, const char *to, const char *from)
/* close off the conversion */
outbuf = buffer;
outlen = in->len * i + 16;
- if (e_iconv(ic, NULL, 0, &outbuf, &outlen) != -1)
+ if (e_iconv(ic, NULL, 0, &outbuf, &outlen) != (size_t) -1)
g_byte_array_append(out, buffer, (in->len*i+16) - outlen);
g_free(buffer);
@@ -157,7 +158,7 @@ convert_buffer (GByteArray *in, const char *to, const char *from)
static gboolean
is_7bit (GByteArray *buffer)
{
- register int i;
+ register unsigned int i;
for (i = 0; i < buffer->len; i++)
if (buffer->data[i] > 127)