From 3e018532430d464e7b521bee808beafcbd5fd7a1 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Thu, 5 May 2011 22:51:47 +0300 Subject: [PATCH] * mu-msg.c: fix compiler warning due to optimization --- src/mu-msg.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mu-msg.c b/src/mu-msg.c index 51c4ed14..f8ce9122 100644 --- a/src/mu-msg.c +++ b/src/mu-msg.c @@ -608,8 +608,8 @@ get_body_cb (GMimeObject *parent, GMimeObject *part, GetBodyData *data) } -/* turn \0-terminated buf into ascii (which is a utf8 subset); - * convert any non-ascii into '.' +/* turn \0-terminated buf into ascii (which is a utf8 subset); convert + * any non-ascii into '.' */ static void asciify (char *buf) @@ -650,11 +650,11 @@ convert_to_utf8 (GMimePart *part, char *buffer) { GMimeContentType *ctype; const char* charset; - char *cur; + unsigned char *cur; /* optimization: if the buffer is plain ascii, no conversion * is done... */ - for (cur = buffer; *cur && *cur < 0x80; ++cur); + for (cur = (unsigned char*)buffer; *cur && *cur < 0x80; ++cur); if (*cur == '\0') return buffer; @@ -674,9 +674,9 @@ convert_to_utf8 (GMimePart *part, char *buffer) } } - /* hmmm.... no charset at all, or conversion failed; ugly hack: - * replace all non-ascii chars with '.' instead... TODO: come up - * with something better */ + /* hmmm.... no charset at all, or conversion failed; ugly + * hack: replace all non-ascii chars with '.' + * instead... TODO: come up with something better */ asciify (buffer); return buffer; }