Re: [evolution-patches] One big patch to rule them all (compilation warnings in camel)



On Thu, 2006-10-19 at 12:13 +0200, Philip Van Hoof wrote:
> Folks, 
> 
> To show my intentions are good, because a lot people seem to actually
> question that, I will create a patch that contains all compilation
> warning fixes for Camel.
> 
> Well, not immediately all of them because some of my work isn't easy to
> extract a patch for (because I have a few significant other changes in
> my copy too).
> 
> I will post this as a enhancement on the bugzilla, here, will put
> Matthew in CC add a ChangeLog, I'll make sure it's tested and feature
> complete (it'll be one big patch).
> 
> I will also fix the problems Jeffrey raised. About the coding style. In
> fact, that is already done (using this script which I ran over the
> existing diffs):
> 
> while (<STDIN>)
> {
>         s/(\*\))([^\s])/$1 $2/g;
>         s/char\*/char \*/g;
>         s/guchar/unsigned gchar/g;
>         s/guint32/unsigned gint32/g;
>         print;
> }
> 
> Hold on tight, it's coming to a mailing list and bugzilla near you.


I'm done. I'm already sumbitting the patch here and it has been attached
to a new bug on bugzilla (and Matthew is in CC) and the ChangeLog entry
has been made and it's feature complete (one big patch).

But! Not yet tested. But I can't do that for the next n hours. I will do
it this evening.

I will already attach the patch so that others can proceed with the
testing of it and so that Novell is entitled to transfer copyright
ownership of the work.

This is the bug:
http://bugzilla.gnome.org/show_bug.cgi?id=363384


-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: vanhoof at x-tend dot be
blog: http://pvanhoof.be/blog
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/ChangeLog,v
retrieving revision 1.2555
diff -u -r1.2555 ChangeLog
--- ChangeLog	5 Oct 2006 14:16:39 -0000	1.2555
+++ ChangeLog	19 Oct 2006 10:51:19 -0000
@@ -1,3 +1,20 @@
+2006-10-19  Philip Van Hoof  <pvanhoof gnome org>
+
+	* In camel/: broken-date-parser.c, camel-block-file.c, camel-folder-search.c, 
+	camel-gpg-context.c, camel-mime-filter-basic.c, 
+	camel-mime-filter-bestenc.c, camel-mime-filter-canon.c, 
+	camel-mime-filter-gzip.c, camel-mime-filter-tohtml.c, 
+	camel-mime-filter-yenc.c, camel-mime-parser.c, 
+	camel-mime-part-utils.c, camel-mime-part.c, 
+	camel-mime-utils.c, camel-multipart.c, camel-object.c, 
+	camel-sasl-anonymous.c, camel-sasl-cram-md5.c, 
+	camel-stream-buffer.c, camel-stream-vfs.c, 
+	camel-stream-vfs.h, 
+	providers/nntp/camel-nntp-store-summary.c,
+	providers/nntp/camel-nntp-stream.c: compilation warnings fixes
+
+	* camel-stream-vfs.c: Bugfix. Initialisation of a flags variable
+	
 2006-10-05  Tor Lillqvist  <tml novell com>
 
 	Fixes from Steffen Eschenbacher:
Index: broken-date-parser.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/broken-date-parser.c,v
retrieving revision 1.17
diff -u -r1.17 broken-date-parser.c
--- broken-date-parser.c	15 Sep 2005 12:08:34 -0000	1.17
+++ broken-date-parser.c	19 Oct 2006 10:51:20 -0000
@@ -120,7 +120,7 @@
 	const unsigned char *start, *end;
 	unsigned int mask;
 	
-	start = date;
+	start = (const unsigned char *) date;
 	while (*start) {
 		/* kill leading whitespace */
 		while (*start && isspace ((int) *start))
@@ -193,7 +193,7 @@
 		return -1;
 	
 	for (wday = 0; wday < 7; wday++)
-		if (!g_ascii_strncasecmp (in, tm_days[wday], 3))
+		if (!g_ascii_strncasecmp ((const char *) in, tm_days[wday], 3))
 			return wday;
 	
 	return -1;  /* unknown week day */
@@ -221,7 +221,7 @@
 		return -1;
 	
 	for (i = 0; i < 12; i++)
-		if (!g_ascii_strncasecmp (in, tm_months[i], 3))
+		if (!g_ascii_strncasecmp ((const char *) in, tm_months[i], 3))
 			return i;
 	
 	return -1;  /* unknown month */
@@ -311,7 +311,7 @@
 				if (len != inlen)
 					continue;
 				
-				if (!strncmp (inptr, tz_offsets[t].name, len))
+				if (!strncmp ((const char *) inptr, tz_offsets[t].name, len))
 					return tz_offsets[t].offset;
 			}
 		}
Index: camel-block-file.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-block-file.c,v
retrieving revision 1.22
diff -u -r1.22 camel-block-file.c
--- camel-block-file.c	12 Apr 2006 19:14:13 -0000	1.22
+++ camel-block-file.c	19 Oct 2006 10:51:21 -0000
@@ -563,7 +563,7 @@
 		bl = g_malloc0(sizeof(*bl));
 		bl->id = id;
 		if (lseek(bs->fd, id, SEEK_SET) == -1 ||
-		    camel_read (bs->fd, bl->data, CAMEL_BLOCK_SIZE) == -1) {
+		    camel_read (bs->fd, (char *) bl->data, CAMEL_BLOCK_SIZE) == -1) {
 			block_file_unuse(bs);
 			CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
 			g_free(bl);
Index: camel-folder-search.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-folder-search.c,v
retrieving revision 1.78
diff -u -r1.78 camel-folder-search.c
--- camel-folder-search.c	9 Jun 2006 01:21:50 -0000	1.78
+++ camel-folder-search.c	19 Oct 2006 10:51:24 -0000
@@ -897,7 +897,7 @@
 					truth = TRUE;
 				} else if (how == CAMEL_SEARCH_MATCH_CONTAINS) {
 					/* doesn't make sense to split words on anything but contains i.e. we can't have an ending match different words */
-					words = camel_search_words_split(argv[i]->value.string);
+					words = camel_search_words_split((const unsigned char *) argv[i]->value.string);
 					truth = TRUE;
 					for (j=0;j<words->len && truth;j++) {
 						truth = camel_search_header_match(header, words->words[j]->word, how, type, NULL);
@@ -1098,7 +1098,7 @@
 		camel_stream_write (CAMEL_STREAM (mem), "", 1);
 		for (i=0;i<words->len;i++) {
 			/* FIXME: This is horridly slow, and should use a real search algorithm */
-			if (camel_ustrstrcase(mem->buffer->data, words->words[i]->word) != NULL) {
+			if (camel_ustrstrcase((const char *) mem->buffer->data, words->words[i]->word) != NULL) {
 				*mask |= (1<<i);
 				/* shortcut a match */
 				if (*mask == (1<<(words->len))-1)
@@ -1187,7 +1187,7 @@
 		} else {
 			for (i=0;i<argc && !truth;i++) {
 				if (argv[i]->type == ESEXP_RES_STRING) {
-					words = camel_search_words_split(argv[i]->value.string);
+					words = camel_search_words_split((const unsigned char *) argv[i]->value.string);
 					truth = TRUE;
 					if ((words->type & CAMEL_SEARCH_WORD_COMPLEX) == 0 && search->body_index) {
 						for (j=0;j<words->len && truth;j++)
@@ -1220,7 +1220,7 @@
 
 			for (i=0;i<argc;i++) {
 				if (argv[i]->type == ESEXP_RES_STRING) {
-					words = camel_search_words_split(argv[i]->value.string);
+					words = camel_search_words_split((const unsigned char *) argv[i]->value.string);
 					if ((words->type & CAMEL_SEARCH_WORD_COMPLEX) == 0 && search->body_index) {
 						matches = match_words_index(search, words, ex);
 					} else {
Index: camel-gpg-context.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-gpg-context.c,v
retrieving revision 1.83
diff -u -r1.83 camel-gpg-context.c
--- camel-gpg-context.c	26 Jun 2006 15:34:28 -0000	1.83
+++ camel-gpg-context.c	19 Oct 2006 10:51:26 -0000
@@ -401,7 +401,7 @@
 		if (gpg->diagbuf->len == 0)
 			return NULL;
 		
-		g_byte_array_append (gpg->diagbuf, "", 1);
+		g_byte_array_append (gpg->diagbuf, (unsigned gchar *) "", 1);
 	}
 	
 	return (const char *) gpg->diagbuf->data;
@@ -748,7 +748,7 @@
 	if (camel_debug("gpg:status"))
 		printf ("status: %s\n", status);
 	
-	if (strncmp (status, "[GNUPG:] ", 9) != 0) {
+	if (strncmp ((char *) status, "[GNUPG:] ", 9) != 0) {
 		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 				      _("Unexpected GnuPG status message encountered:\n\n%s"),
 				      status);
@@ -757,11 +757,11 @@
 	
 	status += 9;
 	
-	if (!strncmp (status, "USERID_HINT ", 12)) {
+	if (!strncmp ((char *) status, "USERID_HINT ", 12)) {
 		char *hint, *user;
 		
 		status += 12;
-		status = next_token (status, &hint);
+		status = (const unsigned char *) next_token ((char *) status, &hint);
 		if (!hint) {
 			camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
 					     _("Failed to parse gpg userid hint."));
@@ -774,18 +774,18 @@
 			goto recycle;
 		}
 		
-		if (gpg->utf8 || !(user = g_locale_to_utf8 (status, -1, &nread, &nwritten, NULL)))
-			user = g_strdup (status);
+		if (gpg->utf8 || !(user = g_locale_to_utf8 ((gchar *) status, -1, &nread, &nwritten, NULL)))
+			user = g_strdup ((gchar *) status);
 		
 		g_strstrip (user);
 		
 		g_hash_table_insert (gpg->userid_hint, hint, user);
-	} else if (!strncmp (status, "NEED_PASSPHRASE ", 16)) {
+	} else if (!strncmp ((char *) status, "NEED_PASSPHRASE ", 16)) {
 		char *userid;
 		
 		status += 16;
 		
-		status = next_token (status, &userid);
+		status = (const unsigned char *) next_token ((char *) status, &userid);
 		if (!userid) {
 			camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
 					     _("Failed to parse gpg passphrase request."));
@@ -794,12 +794,12 @@
 		
 		g_free (gpg->need_id);
 		gpg->need_id = userid;
-	} else if (!strncmp (status, "NEED_PASSPHRASE_PIN ", 20)) {
+	} else if (!strncmp ((char *) status, "NEED_PASSPHRASE_PIN ", 20)) {
 		char *userid;
 		
 		status += 20;
 		
-		status = next_token (status, &userid);
+		status = (const unsigned char *) next_token ((char *) status, &userid);
 		if (!userid) {
 			camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
 					     _("Failed to parse gpg passphrase request."));
@@ -808,7 +808,7 @@
 		
 		g_free (gpg->need_id);
 		gpg->need_id = userid;
-	} else if (!strncmp (status, "GET_HIDDEN ", 11)) {
+	} else if (!strncmp ((char *) status, "GET_HIDDEN ", 11)) {
 		const char *name = NULL;
 		char *prompt, *passwd;
 		guint32 flags;
@@ -820,14 +820,14 @@
 		else if (!name)
 			name = "";
 		
-		if (!strncmp (status, "passphrase.pin.ask", 18)) {
+		if (!strncmp ((char *) status, "passphrase.pin.ask", 18)) {
 			prompt = g_strdup_printf (_("You need a PIN to unlock the key for your\n"
 						    "SmartCard: \"%s\""), name);
-		} else if (!strncmp (status, "passphrase.enter", 16)) {
+		} else if (!strncmp ((char *) status, "passphrase.enter", 16)) {
 			prompt = g_strdup_printf (_("You need a passphrase to unlock the key for\n"
 						    "user: \"%s\""), name);
 		} else {
-			next_token (status, &prompt);
+			next_token ((char *) status, &prompt);
 			camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 					      _("Unexpected request from GnuPG for `%s'"), prompt);
 			g_free (prompt);
@@ -859,9 +859,9 @@
 		}
 		
 		g_free (prompt);
-	} else if (!strncmp (status, "GOOD_PASSPHRASE", 15)) {
+	} else if (!strncmp ((char *) status, "GOOD_PASSPHRASE", 15)) {
 		gpg->bad_passwds = 0;
-	} else if (!strncmp (status, "BAD_PASSPHRASE", 14)) {
+	} else if (!strncmp ((char *) status, "BAD_PASSPHRASE", 14)) {
 		gpg->bad_passwds++;
 		
 		camel_session_forget_password (gpg->session, NULL, NULL, gpg->need_id, ex);
@@ -871,13 +871,13 @@
 					     _("Failed to unlock secret key: 3 bad passphrases given."));
 			return -1;
 		}
-	} else if (!strncmp (status, "UNEXPECTED ", 11)) {
+	} else if (!strncmp ((char *) status, "UNEXPECTED ", 11)) {
 		/* this is an error */
 		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
 				      _("Unexpected response from GnuPG: %s"),
 				      status + 11);
 		return -1;
-	} else if (!strncmp (status, "NODATA", 6)) {
+	} else if (!strncmp ((char *) status, "NODATA", 6)) {
 		/* this is an error */
 		/* But we ignore it anyway, we should get other response codes to say why */
 		gpg->nodata = TRUE;
@@ -885,55 +885,55 @@
 		/* check to see if we are complete */
 		switch (gpg->mode) {
 		case GPG_CTX_MODE_SIGN:
-			if (!strncmp (status, "SIG_CREATED ", 12)) {
+			if (!strncmp ((char *) status, "SIG_CREATED ", 12)) {
 				/* FIXME: save this state? */
 			}
 			break;
 		case GPG_CTX_MODE_VERIFY:
-			if (!strncmp (status, "TRUST_", 6)) {
+			if (!strncmp ((char *) status, "TRUST_", 6)) {
 				status += 6;
-				if (!strncmp (status, "NEVER", 5)) {
+				if (!strncmp ((char *) status, "NEVER", 5)) {
 					gpg->trust = GPG_TRUST_NEVER;
-				} else if (!strncmp (status, "MARGINAL", 8)) {
+				} else if (!strncmp ((char *) status, "MARGINAL", 8)) {
 					gpg->trust = GPG_TRUST_MARGINAL;
-				} else if (!strncmp (status, "FULLY", 5)) {
+				} else if (!strncmp ((char *) status, "FULLY", 5)) {
 					gpg->trust = GPG_TRUST_FULLY;
-				} else if (!strncmp (status, "ULTIMATE", 8)) {
+				} else if (!strncmp ((char *) status, "ULTIMATE", 8)) {
 					gpg->trust = GPG_TRUST_ULTIMATE;
-				} else if (!strncmp (status, "UNDEFINED", 9)) {
+				} else if (!strncmp ((char *) status, "UNDEFINED", 9)) {
 					gpg->trust = GPG_TRUST_UNDEFINED;
 				}
-			} else if (!strncmp (status, "GOODSIG ", 8)) {
+			} else if (!strncmp ((char *) status, "GOODSIG ", 8)) {
 				gpg->goodsig = TRUE;
 				gpg->hadsig = TRUE;
-			} else if (!strncmp (status, "VALIDSIG ", 9)) {
+			} else if (!strncmp ((char *) status, "VALIDSIG ", 9)) {
 				gpg->validsig = TRUE;
-			} else if (!strncmp (status, "BADSIG ", 7)) {
+			} else if (!strncmp ((char *) status, "BADSIG ", 7)) {
 				gpg->badsig = FALSE;
 				gpg->hadsig = TRUE;
-			} else if (!strncmp (status, "ERRSIG ", 7)) {
+			} else if (!strncmp ((char *) status, "ERRSIG ", 7)) {
 				/* Note: NO_PUBKEY often comes after an ERRSIG */
 				gpg->errsig = FALSE;
 				gpg->hadsig = TRUE;
-			} else if (!strncmp (status, "NO_PUBKEY ", 10)) {
+			} else if (!strncmp ((char *) status, "NO_PUBKEY ", 10)) {
 				gpg->nopubkey = TRUE;
 			}
 			break;
 		case GPG_CTX_MODE_ENCRYPT:
-			if (!strncmp (status, "BEGIN_ENCRYPTION", 16)) {
+			if (!strncmp ((char *) status, "BEGIN_ENCRYPTION", 16)) {
 				/* nothing to do... but we know to expect data on stdout soon */
-			} else if (!strncmp (status, "END_ENCRYPTION", 14)) {
+			} else if (!strncmp ((char *) status, "END_ENCRYPTION", 14)) {
 				/* nothing to do, but we know the end is near? */
-			} else if (!strncmp (status, "NO_RECP", 7)) {
+			} else if (!strncmp ((char *) status, "NO_RECP", 7)) {
 				camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
 						     _("Failed to encrypt: No valid recipients specified."));
 				return -1;
 			}
 			break;
 		case GPG_CTX_MODE_DECRYPT:
-			if (!strncmp (status, "BEGIN_DECRYPTION", 16)) {
+			if (!strncmp ((char *) status, "BEGIN_DECRYPTION", 16)) {
 				/* nothing to do... but we know to expect data on stdout soon */
-			} else if (!strncmp (status, "END_DECRYPTION", 14)) {
+			} else if (!strncmp ((char *) status, "END_DECRYPTION", 14)) {
 				/* nothing to do, but we know the end is near? */
 			}
 			break;
Index: camel-mime-filter-basic.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-filter-basic.c,v
retrieving revision 1.23
diff -u -r1.23 camel-mime-filter-basic.c
--- camel-mime-filter-basic.c	12 Apr 2006 19:14:13 -0000	1.23
+++ camel-mime-filter-basic.c	19 Oct 2006 10:51:26 -0000
@@ -101,38 +101,38 @@
 	case CAMEL_MIME_FILTER_BASIC_BASE64_ENC:
 		/* wont go to more than 2x size (overly conservative) */
 		camel_mime_filter_set_size(mf, len*2+6, FALSE);
-		newlen = camel_base64_encode_close(in, len, TRUE, mf->outbuf, &f->state, &f->save);
+		newlen = camel_base64_encode_close((unsigned char *) in, len, TRUE, (unsigned char *) mf->outbuf, &f->state, &f->save);
 		g_assert(newlen <= len*2+6);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_QP_ENC:
 		/* *4 is definetly more than needed ... */
 		camel_mime_filter_set_size(mf, len*4+4, FALSE);
-		newlen = camel_quoted_encode_close(in, len, mf->outbuf, &f->state, &f->save);
+		newlen = camel_quoted_encode_close((unsigned char *) in, len, (unsigned char *) mf->outbuf, &f->state, &f->save);
 		g_assert(newlen <= len*4+4);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_UU_ENC:
 		/* won't go to more than 2 * (x + 2) + 62 */
 		camel_mime_filter_set_size (mf, (len + 2) * 2 + 62, FALSE);
-		newlen = camel_uuencode_close (in, len, mf->outbuf, f->uubuf, &f->state, &f->save);
+		newlen = camel_uuencode_close ((unsigned char *) in, len, (unsigned char *) mf->outbuf, f->uubuf, (int *) &f->state, (guint32 *) &f->save);
 		g_assert (newlen <= (len + 2) * 2 + 62);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_BASE64_DEC:
 		/* output can't possibly exceed the input size */
  		camel_mime_filter_set_size(mf, len, FALSE);
-		newlen = camel_base64_decode_step(in, len, mf->outbuf, &f->state, &f->save);
+		newlen = camel_base64_decode_step((unsigned char *) in, len, (unsigned char *) mf->outbuf, (int *) &f->state, (guint32 *) &f->save);
 		g_assert(newlen <= len);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_QP_DEC:
 		/* output can't possibly exceed the input size, well unless its not really qp, then +2 max */
 		camel_mime_filter_set_size(mf, len+2, FALSE);
-		newlen = camel_quoted_decode_step(in, len, mf->outbuf, &f->state, &f->save);
+		newlen = camel_quoted_decode_step((unsigned char *) in, len, (unsigned char *) mf->outbuf, (int *) &f->state, (int *) &f->save);
 		g_assert(newlen <= len+2);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_UU_DEC:
 		if ((f->state & CAMEL_UUDECODE_STATE_BEGIN) && !(f->state & CAMEL_UUDECODE_STATE_END)) {
 			/* "begin <mode> <filename>\n" has been found, so we can now start decoding */
 			camel_mime_filter_set_size (mf, len + 3, FALSE);
-			newlen = camel_uudecode_step (in, len, mf->outbuf, &f->state, &f->save);
+			newlen = camel_uudecode_step ((unsigned char *) in, len, (unsigned char *) mf->outbuf, (int *) &f->state, (guint32 *) &f->save);
 		} else {
 			newlen = 0;
 		}
@@ -164,31 +164,31 @@
 	case CAMEL_MIME_FILTER_BASIC_BASE64_ENC:
 		/* wont go to more than 2x size (overly conservative) */
 		camel_mime_filter_set_size(mf, len*2+6, FALSE);
-		newlen = camel_base64_encode_step(in, len, TRUE, mf->outbuf, &f->state, &f->save);
+		newlen = camel_base64_encode_step((unsigned char *) in, len, TRUE,  (unsigned char *) mf->outbuf, &f->state, (gint*) &f->save);
 		g_assert(newlen <= len*2+6);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_QP_ENC:
 		/* *4 is overly conservative, but will do */
 		camel_mime_filter_set_size(mf, len*4+4, FALSE);
-		newlen = camel_quoted_encode_step(in, len, mf->outbuf, &f->state, &f->save);
+		newlen = camel_quoted_encode_step((unsigned char *) in, len,  (unsigned char *) mf->outbuf, &f->state, (gint*) &f->save);
 		g_assert(newlen <= len*4+4);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_UU_ENC:
 		/* won't go to more than 2 * (x + 2) + 62 */
 		camel_mime_filter_set_size (mf, (len + 2) * 2 + 62, FALSE);
-		newlen = camel_uuencode_step (in, len, mf->outbuf, f->uubuf, &f->state, &f->save);
+		newlen = camel_uuencode_step ((unsigned char *) in, len,  (unsigned char *) mf->outbuf, f->uubuf, &f->state, (guint32*) &f->save);
 		g_assert (newlen <= (len + 2) * 2 + 62);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_BASE64_DEC:
 		/* output can't possibly exceed the input size */
 		camel_mime_filter_set_size(mf, len+3, FALSE);
-		newlen = camel_base64_decode_step(in, len, mf->outbuf, &f->state, &f->save);
+		newlen = camel_base64_decode_step((unsigned char *) in, len, (unsigned char *) mf->outbuf, (int *) &f->state, (unsigned int *) &f->save);
 		g_assert(newlen <= len+3);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_QP_DEC:
 		/* output can't possibly exceed the input size */
 		camel_mime_filter_set_size(mf, len + 2, FALSE);
-		newlen = camel_quoted_decode_step(in, len, mf->outbuf, &f->state, &f->save);
+		newlen = camel_quoted_decode_step((unsigned char *) in, len, (unsigned char *) mf->outbuf, &f->state, &f->save);
 		g_assert(newlen <= len + 2);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_UU_DEC:
@@ -230,7 +230,7 @@
 		if ((f->state & CAMEL_UUDECODE_STATE_BEGIN) && !(f->state & CAMEL_UUDECODE_STATE_END)) {
 			/* "begin <mode> <filename>\n" has been found, so we can now start decoding */
 			camel_mime_filter_set_size (mf, len + 3, FALSE);
-			newlen = camel_uudecode_step (in, len, mf->outbuf, &f->state, &f->save);
+			newlen = camel_uudecode_step ((unsigned char *) in, len, (unsigned char *) mf->outbuf, &f->state, (guint32 *) &f->save);
 		} else {
 			newlen = 0;
 		}
Index: camel-mime-filter-bestenc.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-filter-bestenc.c,v
retrieving revision 1.11
diff -u -r1.11 camel-mime-filter-bestenc.c
--- camel-mime-filter-bestenc.c	22 Sep 2005 11:54:49 -0000	1.11
+++ camel-mime-filter-bestenc.c	19 Oct 2006 10:51:26 -0000
@@ -102,7 +102,7 @@
 		f->startofline = FALSE;
 
 		/* See rfc2045 section 2 for definitions of 7bit/8bit/binary */
-		p = in;
+		p = (unsigned char *) in;
 		pend = p + len;
 		while (p<pend) {
 			c = *p++;
@@ -130,7 +130,7 @@
 					/* Check for "^From " lines */
 					if ((f->flags & CAMEL_BESTENC_NO_FROM) && !f->hadfrom) {
 						if (pend-p >= 5) {
-							f->hadfrom = strncmp(p, "From ", 5) == 0;
+							f->hadfrom = strncmp((char *) p, (char *) "From ", 5) == 0;
 						} else if (pend-p == 0) {
 							f->startofline = TRUE;
 						} else {
Index: camel-mime-filter-canon.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-filter-canon.c,v
retrieving revision 1.8
diff -u -r1.8 camel-mime-filter-canon.c
--- camel-mime-filter-canon.c	31 Aug 2005 04:21:56 -0000	1.8
+++ camel-mime-filter-canon.c	19 Oct 2006 10:51:26 -0000
@@ -80,8 +80,8 @@
 	flags = ((CamelMimeFilterCanon *)f)->flags;
 
 	/* first, work out how much space we need */
-	inptr = in;
-	inend = in+len;
+	inptr = (unsigned char *) in;
+	inend = (const unsigned char *) (in+len);
 	while (inptr < inend)
 		if (*inptr++ == '\n')
 			lf++;
@@ -93,7 +93,7 @@
 	camel_mime_filter_set_size(f, len+lf*3+4, FALSE);
 
 	o = f->outbuf;
-	inptr = in;
+	inptr = (unsigned char *) in;
 	start = inptr;
 	starto = o;
 	while (inptr < inend) {
@@ -102,7 +102,7 @@
 		if (flags & CAMEL_MIME_FILTER_CANON_FROM && c == 'F') {
 			inptr++;
 			if (inptr < inend-4) {
-				if (strncmp(inptr, "rom ", 4) == 0) {
+				if (strncmp((char *) inptr, "rom ", 4) == 0) {
 					strcpy(o, "=46rom ");
 					inptr+=4;
 					o+= 7;
@@ -153,7 +153,7 @@
 	if (last) {
 		*outlen = o - f->outbuf;
 	} else {
-		camel_mime_filter_backup(f, start, inend - start);
+		camel_mime_filter_backup(f, (const char *) start, inend - start);
 		*outlen = starto - f->outbuf;
 	}
 
Index: camel-mime-filter-gzip.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-filter-gzip.c,v
retrieving revision 1.4
diff -u -r1.4 camel-mime-filter-gzip.c
--- camel-mime-filter-gzip.c	12 Apr 2006 19:14:13 -0000	1.4
+++ camel-mime-filter-gzip.c	19 Oct 2006 10:51:27 -0000
@@ -185,18 +185,18 @@
 		
 		memcpy (filter->outbuf, priv->hdr.buf, 10);
 		
-		priv->stream->next_out = filter->outbuf + 10;
+		priv->stream->next_out = (Bytef *) filter->outbuf + 10;
 		priv->stream->avail_out = filter->outsize - 10;
 		
 		priv->state.zip.wrote_hdr = TRUE;
 	} else {
 		camel_mime_filter_set_size (filter, (len * 2) + 12, FALSE);
 		
-		priv->stream->next_out = filter->outbuf;
+		priv->stream->next_out = (Bytef *) filter->outbuf;
 		priv->stream->avail_out = filter->outsize;
 	}
 	
-	priv->stream->next_in = in;
+	priv->stream->next_in = (Bytef *) in;
 	priv->stream->avail_in = len;
 	
 	do {
@@ -210,7 +210,7 @@
 			n = filter->outsize - priv->stream->avail_out;
 			camel_mime_filter_set_size (filter, n + (priv->stream->avail_in * 2) + 12, TRUE);
 			priv->stream->avail_out = filter->outsize - n;
-			priv->stream->next_out = filter->outbuf + n;
+			priv->stream->next_out = (Bytef *) filter->outbuf + n;
 			
 			if (priv->stream->avail_in == 0) {
 				guint32 val;
@@ -229,13 +229,13 @@
 			}
 		} else {
 			if (priv->stream->avail_in > 0)
-				camel_mime_filter_backup (filter, priv->stream->next_in, priv->stream->avail_in);
+				camel_mime_filter_backup (filter, (const char *) priv->stream->next_in, priv->stream->avail_in);
 			
 			break;
 		}
 	} while (1);
 	
-	priv->crc32 = crc32 (priv->crc32, in, len - priv->stream->avail_in);
+	priv->crc32 = crc32 (priv->crc32, (unsigned char *) in, len - priv->stream->avail_in);
 	priv->isize += len - priv->stream->avail_in;
 	
 	*out = filter->outbuf;
@@ -346,10 +346,10 @@
 	
 	camel_mime_filter_set_size (filter, (len * 2) + 12, FALSE);
 	
-	priv->stream->next_in = in;
+	priv->stream->next_in = (Bytef *) in;
 	priv->stream->avail_in = len - 8;
 	
-	priv->stream->next_out = filter->outbuf;
+	priv->stream->next_out = (Bytef *) filter->outbuf;
 	priv->stream->avail_out = filter->outsize;
 	
 	do {
@@ -368,12 +368,12 @@
 			n = filter->outsize - priv->stream->avail_out;
 			camel_mime_filter_set_size (filter, n + (priv->stream->avail_in * 2) + 12, TRUE);
 			priv->stream->avail_out = filter->outsize - n;
-			priv->stream->next_out = filter->outbuf + n;
+			priv->stream->next_out = (Bytef *) filter->outbuf + n;
 		} else {
 			priv->stream->avail_in += 8;
 			
 			if (priv->stream->avail_in > 0)
-				camel_mime_filter_backup (filter, priv->stream->next_in, priv->stream->avail_in);
+				camel_mime_filter_backup (filter, (char *) priv->stream->next_in, priv->stream->avail_in);
 			
 			break;
 		}
Index: camel-mime-filter-tohtml.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-filter-tohtml.c,v
retrieving revision 1.22
diff -u -r1.22 camel-mime-filter-tohtml.c
--- camel-mime-filter-tohtml.c	12 Apr 2006 19:14:13 -0000	1.22
+++ camel-mime-filter-tohtml.c	19 Oct 2006 10:51:27 -0000
@@ -170,7 +170,7 @@
 		guint32 u;
 		
 		outptr = check_size (filter, outptr, outend, 16);
-		
+
 		u = camel_utf8_getc_limit ((const unsigned char **) &inptr, (const unsigned char *) inend);
 		switch (u) {
 		case 0xffff:
Index: camel-mime-filter-yenc.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-filter-yenc.c,v
retrieving revision 1.5
diff -u -r1.5 camel-mime-filter-yenc.c
--- camel-mime-filter-yenc.c	12 Apr 2006 19:14:13 -0000	1.5
+++ camel-mime-filter-yenc.c	19 Oct 2006 10:51:28 -0000
@@ -95,7 +95,7 @@
 	case CAMEL_MIME_FILTER_YENC_DIRECTION_ENCODE:
 		/* won't go to more than 2 * (x + 2) + 62 */
 		camel_mime_filter_set_size (filter, (len + 2) * 2 + 62, FALSE);
-		newlen = camel_yencode_step (in, len, filter->outbuf, &yenc->state,
+		newlen = camel_yencode_step ((const unsigned char *) in, len, (unsigned char *) filter->outbuf, &yenc->state,
 					     &yenc->pcrc, &yenc->crc);
 		g_assert (newlen <= (len + 2) * 2 + 62);
 		break;
@@ -166,7 +166,7 @@
 		if ((yenc->state & CAMEL_MIME_YDECODE_STATE_DECODE) && !(yenc->state & CAMEL_MIME_YDECODE_STATE_END)) {
 			/* all yEnc headers have been found so we can now start decoding */
 			camel_mime_filter_set_size (filter, len + 3, FALSE);
-			newlen = camel_ydecode_step (in, len, filter->outbuf, &yenc->state, &yenc->pcrc, &yenc->crc);
+			newlen = camel_ydecode_step ((const unsigned char *) in, len, (unsigned char *) filter->outbuf, &yenc->state, &yenc->pcrc, &yenc->crc);
 			g_assert (newlen <= len + 3);
 		} else {
 			newlen = 0;
@@ -190,7 +190,7 @@
 	case CAMEL_MIME_FILTER_YENC_DIRECTION_ENCODE:
 		/* won't go to more than 2 * (x + 2) + 62 */
 		camel_mime_filter_set_size (filter, (len + 2) * 2 + 62, FALSE);
-		newlen = camel_yencode_close (in, len, filter->outbuf, &yenc->state,
+		newlen = camel_yencode_close ((const unsigned char *) in, len, (unsigned char *) filter->outbuf, &yenc->state,
 					       &yenc->pcrc, &yenc->crc);
 		g_assert (newlen <= (len + 2) * 2 + 62);
 		break;
@@ -198,7 +198,7 @@
 		if ((yenc->state & CAMEL_MIME_YDECODE_STATE_DECODE) && !(yenc->state & CAMEL_MIME_YDECODE_STATE_END)) {
 			/* all yEnc headers have been found so we can now start decoding */
 			camel_mime_filter_set_size (filter, len + 3, FALSE);
-			newlen = camel_ydecode_step (in, len, filter->outbuf, &yenc->state,
+			newlen = camel_ydecode_step ((const unsigned char *) in, len, (unsigned char *) filter->outbuf, &yenc->state,
 						      &yenc->pcrc, &yenc->crc);
 			g_assert (newlen <= len + 3);
 		} else {
Index: camel-mime-parser.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-parser.c,v
retrieving revision 1.68
diff -u -r1.68 camel-mime-parser.c
--- camel-mime-parser.c	12 Apr 2006 19:14:13 -0000	1.68
+++ camel-mime-parser.c	19 Oct 2006 10:51:31 -0000
@@ -368,7 +368,7 @@
 		return NULL;
 
 	if (array->len == 0 || array->data[array->len-1] != '\0')
-		g_byte_array_append(array, "", 1);
+		g_byte_array_append(array, (unsigned char *) "", 1);
 
 	return (const char *) array->data;
 }
@@ -1041,7 +1041,7 @@
 		}
 
 		if (save)
-			g_byte_array_append(save, s->inptr, inptr-s->inptr);
+			g_byte_array_append(save, (unsigned char *) s->inptr, inptr-s->inptr);
 
 		s->inptr = inptr;
 
@@ -1714,11 +1714,11 @@
 					if (h->prestage > 0) {
 						if (h->posttext == NULL)
 							h->posttext = g_byte_array_new();
-						g_byte_array_append(h->posttext, *databuffer, *datalength);
+						g_byte_array_append(h->posttext, (unsigned char *) *databuffer, *datalength);
 					} else {
 						if (h->pretext == NULL)
 							h->pretext = g_byte_array_new();
-						g_byte_array_append(h->pretext, *databuffer, *datalength);
+						g_byte_array_append(h->pretext, (unsigned char *) *databuffer, *datalength);
 					}
 				}
 			} while (hb==h && *datalength>0);
Index: camel-mime-part-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-part-utils.c,v
retrieving revision 1.104
diff -u -r1.104 camel-mime-part-utils.c
--- camel-mime-part-utils.c	12 Apr 2006 19:14:13 -0000	1.104
+++ camel-mime-part-utils.c	19 Oct 2006 10:51:31 -0000
@@ -68,7 +68,7 @@
 	buffer = g_byte_array_new ();
 	while (camel_mime_parser_step (mp, &buf, &len) != CAMEL_MIME_PARSER_STATE_BODY_END) {
 		d(printf("appending o/p data: %d: %.*s\n", len, len, buf));
-		g_byte_array_append (buffer, buf, len);
+		g_byte_array_append (buffer, (guchar *) buf, len);
 	}
 	
 	d(printf("message part kept in memory!\n"));
Index: camel-mime-part.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-part.c,v
retrieving revision 1.171
diff -u -r1.171 camel-mime-part.c
--- camel-mime-part.c	12 Apr 2006 19:14:13 -0000	1.171
+++ camel-mime-part.c	19 Oct 2006 10:51:34 -0000
@@ -341,7 +341,7 @@
 void
 camel_mime_part_set_description (CamelMimePart *mime_part, const char *description)
 {
-	char *text = camel_header_encode_string (description);
+	char *text = camel_header_encode_string ((const unsigned char *) description);
 	
 	camel_medium_set_header (CAMEL_MEDIUM (mime_part),
 				 "Content-Description", text);
Index: camel-mime-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-utils.c,v
retrieving revision 1.238
diff -u -r1.238 camel-mime-utils.c
--- camel-mime-utils.c	13 Apr 2006 19:59:13 -0000	1.238
+++ camel-mime-utils.c	19 Oct 2006 10:51:38 -0000
@@ -356,7 +356,7 @@
 	
 	out = g_malloc (len * 4 / 3 + 5);
 	outlen = camel_base64_encode_close ((unsigned char *)data, len, FALSE,
-				      out, &state, &save);
+				      out, &state, (gint*) &save);
 	out[outlen] = '\0';
 	return (char *)out;
 }
@@ -1032,13 +1032,13 @@
 		decword = g_alloca (tmplen); /* this will always be more-than-enough room */
 		switch(toupper(inptr[0])) {
 		case 'Q':
-			inlen = quoted_decode(inptr+2, tmplen, decword);
+			inlen = quoted_decode((const unsigned char *) inptr+2, tmplen, (unsigned char *) decword);
 			break;
 		case 'B': {
 			int state = 0;
 			unsigned int save = 0;
 			
-			inlen = camel_base64_decode_step((char *)inptr+2, tmplen, decword, &state, &save);
+			inlen = camel_base64_decode_step((unsigned char *) inptr+2, tmplen, (unsigned char *) decword, &state, &save);
 			/* if state != 0 then error? */
 			break;
 		}
@@ -1380,7 +1380,7 @@
 			else
 				*out++ = ' ';
 			out += sprintf (out, "=?%s?Q?", type);
-			out += quoted_encode (buffer, enclen, out, safemask);
+			out += quoted_encode ((const unsigned char *) buffer, enclen,  (unsigned char *) out, safemask);
 			sprintf (out, "?=");
 			
 			d(printf("converted part = %s\n", ascii));
@@ -1414,7 +1414,7 @@
 	GString *out;
 	char *outstr;
 
-	g_return_val_if_fail (g_utf8_validate (in, -1, NULL), NULL);
+	g_return_val_if_fail (g_utf8_validate ((const gchar *) in, -1, NULL), NULL);
 	
 	if (in == NULL)
 		return NULL;
@@ -1426,7 +1426,7 @@
 		inptr++;
 	}
 	if (*inptr == '\0')
-		return g_strdup (in);
+		return g_strdup ((gchar *) in);
 	
 	/* This gets each word out of the input, and checks to see what charset
 	   can be used to encode it. */
@@ -1441,7 +1441,7 @@
 		const char *newinptr;
 		
 		newinptr = g_utf8_next_char (inptr);
-		c = g_utf8_get_char (inptr);
+		c = g_utf8_get_char ((char *) inptr);
 		if (newinptr == NULL || !g_unichar_validate (c)) {
 			w(g_warning ("Invalid UTF-8 sequence encountered (pos %d, char '%c'): %s",
 				     (inptr-in), inptr[0], in));
@@ -1453,29 +1453,29 @@
 			/* we've reached the end of a 'word' */
 			if (word && !(last_was_encoded && encoding)) {
 				/* output lwsp between non-encoded words */
-				g_string_append_len (out, start, word - start);
+				g_string_append_len (out, (const gchar *) start, word - start);
 				start = word;
 			}
 			
 			switch (encoding) {
 			case 0:
-				g_string_append_len (out, start, inptr - start);
+				g_string_append_len (out, (const gchar *) start, inptr - start);
 				last_was_encoded = FALSE;
 				break;
 			case 1:
 				if (last_was_encoded)
 					g_string_append_c (out, ' ');
 				
-				rfc2047_encode_word (out, start, inptr - start, "ISO-8859-1", CAMEL_MIME_IS_ESAFE);
+				rfc2047_encode_word (out, (const char *) start, inptr - start, "ISO-8859-1", CAMEL_MIME_IS_ESAFE);
 				last_was_encoded = TRUE;
 				break;
 			case 2:
 				if (last_was_encoded)
 					g_string_append_c (out, ' ');
 				
-				if (!(charset = camel_charset_best (start, inptr - start)))
+				if (!(charset = camel_charset_best ((const char *) start, inptr - start)))
 					charset = "UTF-8";
-				rfc2047_encode_word (out, start, inptr - start, charset, CAMEL_MIME_IS_ESAFE);
+				rfc2047_encode_word (out, (const char *) start, inptr - start, charset, CAMEL_MIME_IS_ESAFE);
 				last_was_encoded = TRUE;
 				break;
 			}
@@ -1497,32 +1497,32 @@
 		if (!(c < 256 && camel_mime_is_lwsp (c)) && !word)
 			word = inptr;
 		
-		inptr = newinptr;
+		inptr = (const unsigned char *) newinptr;
 	}
 	
 	if (inptr - start) {
 		if (word && !(last_was_encoded && encoding)) {
-			g_string_append_len (out, start, word - start);
+			g_string_append_len (out, (const gchar *) start, word - start);
 			start = word;
 		}
 		
 		switch (encoding) {
 		case 0:
-			g_string_append_len (out, start, inptr - start);
+			g_string_append_len (out, (const gchar *) start, inptr - start);
 			break;
 		case 1:
 			if (last_was_encoded)
 				g_string_append_c (out, ' ');
 			
-			rfc2047_encode_word (out, start, inptr - start, "ISO-8859-1", CAMEL_MIME_IS_ESAFE);
+			rfc2047_encode_word (out, (const char *) start, inptr - start, "ISO-8859-1", CAMEL_MIME_IS_ESAFE);
 			break;
 		case 2:
 			if (last_was_encoded)
 				g_string_append_c (out, ' ');
 			
-			if (!(charset = camel_charset_best (start, inptr - start)))
+			if (!(charset = camel_charset_best ( (const char *) start, inptr - start)))
 				charset = "UTF-8";
-			rfc2047_encode_word (out, start, inptr - start, charset, CAMEL_MIME_IS_ESAFE);
+			rfc2047_encode_word (out, (const char *) start, inptr - start, charset, CAMEL_MIME_IS_ESAFE);
 			break;
 		}
 	}
@@ -1601,7 +1601,7 @@
 		const char *newinptr;
 		
 		newinptr = g_utf8_next_char (inptr);
-		c = g_utf8_get_char (inptr);
+		c = g_utf8_get_char ((char *) inptr);
 		
 		if (!g_unichar_validate (c)) {
 			w(g_warning ("Invalid UTF-8 sequence encountered (pos %d, char '%c'): %s",
@@ -1610,7 +1610,7 @@
 			continue;
 		}
 		
-		inptr = newinptr;
+		inptr = (const unsigned char *) newinptr;
 		if (g_unichar_isspace (c)) {
 			if (count > 0) {
 				word = g_new0 (struct _phrase_word, 1);
@@ -1746,28 +1746,28 @@
 		if (last_word && !(last_word->type == WORD_2047 && word->type == WORD_2047)) {
 			/* one or both of the words are not encoded so we write the spaces out untouched */
 			len = word->start - last_word->end;
-			out = g_string_append_len (out, last_word->end, len);
+			out = g_string_append_len (out, (const gchar *) last_word->end, len);
 		}
 		
 		switch (word->type) {
 		case WORD_ATOM:
-			out = g_string_append_len (out, word->start, word->end - word->start);
+			out = g_string_append_len (out, (const gchar *) word->start, word->end - word->start);
 			break;
 		case WORD_QSTRING:
-			quote_word (out, TRUE, word->start, word->end - word->start);
+			quote_word (out, TRUE, (const char *) word->start, word->end - word->start);
 			break;
 		case WORD_2047:
 			if (last_word && last_word->type == WORD_2047) {
 				/* include the whitespace chars between these 2 words in the
                                    resulting rfc2047 encoded word. */
 				len = word->end - last_word->end;
-				start = last_word->end;
+				start = (const char *) last_word->end;
 				
 				/* encoded words need to be separated by linear whitespace */
 				g_string_append_c (out, ' ');
 			} else {
 				len = word->end - word->start;
-				start = word->start;
+				start = (const char *) word->start;
 			}
 			
 			if (word->encoding == 1) {
@@ -1957,11 +1957,12 @@
 static char *
 hex_decode (const char *in, size_t len)
 {
-	const unsigned char *inend = in + len;
+	const unsigned char *inend = (const unsigned char *) (in + len);
 	unsigned char *inptr, *outptr;
 	char *outbuf;
 	
-	outptr = outbuf = g_malloc (len + 1);
+	outbuf = (char *) g_malloc (len + 1);
+	outptr = (unsigned char *) outbuf;
 	
 	inptr = (unsigned char *) in;
 	while (inptr < inend) {
@@ -3215,15 +3216,15 @@
 
 	/* if we have really broken utf8 passed in, we just treat it as binary data */
 
-	charset = camel_charset_best(in, strlen(in));
+	charset = camel_charset_best((char *) in, strlen((char *) in));
 	if (charset == NULL)
-		return g_strdup(in);
+		return g_strdup((gchar *) in);
 	
 	if (g_ascii_strcasecmp(charset, "UTF-8") != 0) {
-		if ((outbuf = header_convert(charset, "UTF-8", in, strlen(in))))
+		if ((outbuf = (unsigned char *) header_convert(charset, "UTF-8", (const char *) in, strlen((char *) in))))
 			inptr = outbuf;
 		else
-			return g_strdup(in);
+			return g_strdup((gchar *) in);
 	}
 	
 	/* FIXME: set the 'language' as well, assuming we can get that info...? */
@@ -3262,7 +3263,7 @@
 			continue;
 		}
 		
-		value = header_encode_param (p->value, &encoded);
+		value = header_encode_param ((unsigned char *) p->value, &encoded);
 		if (!value) {
 			w(g_warning ("appending parameter %s=%s violates rfc2184", p->name, p->value));
 			value = g_strdup (p->value);
@@ -3783,7 +3784,7 @@
 {
 	unsigned char *p;
 
-	p = h->value;
+	p = (unsigned char *) h->value;
 	while (p && *p) {
 		if (!isascii(*p)) {
 			w(g_warning("Appending header violates rfc: %s: %s", h->name, h->value));
@@ -4249,7 +4250,7 @@
 		switch (a->type) {
 		case CAMEL_HEADER_ADDRESS_NAME:
 			if (encode)
-				text = camel_header_encode_phrase (a->name);
+				text = camel_header_encode_phrase ((unsigned char *) a->name);
 			else
 				text = a->name;
 			if (text && *text)
@@ -4261,7 +4262,7 @@
 			break;
 		case CAMEL_HEADER_ADDRESS_GROUP:
 			if (encode)
-				text = camel_header_encode_phrase (a->name);
+				text = camel_header_encode_phrase ((unsigned char *) a->name);
 			else
 				text = a->name;
 			g_string_append_printf (out, "%s: ", text);
Index: camel-multipart.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-multipart.c,v
retrieving revision 1.63
diff -u -r1.63 camel-multipart.c
--- camel-multipart.c	6 Dec 2005 04:21:54 -0000	1.63
+++ camel-multipart.c	19 Oct 2006 10:51:40 -0000
@@ -363,12 +363,12 @@
 		bgen = g_strdup_printf ("%p:%lu:%lu", multipart,
 					(unsigned long) getpid(),
 					(unsigned long) time(0));
-		md5_get_digest (bgen, strlen (bgen), digest);
+		md5_get_digest (bgen, strlen ((char *) bgen), (guchar *) digest);
 		g_free (bgen);
 		strcpy (bbuf, "=-");
 		p = bbuf + 2;
 		state = save = 0;
-		p += camel_base64_encode_step (digest, 16, FALSE, p, &state, &save);
+		p += camel_base64_encode_step ((unsigned char *) digest, 16, FALSE, (unsigned char *) p, &state, &save);
 		*p = '\0';
 
 		boundary = bbuf;
Index: camel-object.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-object.c,v
retrieving revision 1.61
diff -u -r1.61 camel-object.c
--- camel-object.c	28 Aug 2006 17:24:59 -0000	1.61
+++ camel-object.c	19 Oct 2006 10:51:42 -0000
@@ -471,7 +471,7 @@
 			switch(argv->argv[argv->argc].tag & CAMEL_ARG_TYPE) {
 			case CAMEL_ARG_INT:
 			case CAMEL_ARG_BOO:
-				if (camel_file_util_decode_uint32(fp, &argv->argv[argv->argc].ca_int) == -1)
+				if (camel_file_util_decode_uint32(fp, (guint32 *) &argv->argv[argv->argc].ca_int) == -1)
 					goto cleanup;
 				break;
 			case CAMEL_ARG_STR:
Index: camel-sasl-anonymous.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-sasl-anonymous.c,v
retrieving revision 1.14
diff -u -r1.14 camel-sasl-anonymous.c
--- camel-sasl-anonymous.c	6 Dec 2005 04:21:54 -0000	1.14
+++ camel-sasl-anonymous.c	19 Oct 2006 10:51:42 -0000
@@ -135,7 +135,7 @@
 		}
 		camel_object_unref (cia);
 		ret = g_byte_array_new ();
-		g_byte_array_append (ret, sasl_anon->trace_info, strlen (sasl_anon->trace_info));
+		g_byte_array_append (ret, (const unsigned gchar *) sasl_anon->trace_info, strlen (sasl_anon->trace_info));
 		break;
 	case CAMEL_SASL_ANON_TRACE_OPAQUE:
 		if (strchr (sasl_anon->trace_info, '@')) {
@@ -145,7 +145,7 @@
 			return NULL;
 		}
 		ret = g_byte_array_new ();
-		g_byte_array_append (ret, sasl_anon->trace_info, strlen (sasl_anon->trace_info));
+		g_byte_array_append (ret, (const unsigned gchar *) sasl_anon->trace_info, strlen (sasl_anon->trace_info));
 		break;
 	case CAMEL_SASL_ANON_TRACE_EMPTY:
 		ret = g_byte_array_new ();
Index: camel-sasl-cram-md5.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-sasl-cram-md5.c,v
retrieving revision 1.15
diff -u -r1.15 camel-sasl-cram-md5.c
--- camel-sasl-cram-md5.c	6 Dec 2005 04:21:54 -0000	1.15
+++ camel-sasl-cram-md5.c	19 Oct 2006 10:51:42 -0000
@@ -132,11 +132,11 @@
 	
 	/* lowercase hexify that bad-boy... */
 	for (s = digest, p = md5asc; p < md5asc + 32; s++, p += 2)
-		sprintf (p, "%.2x", *s);
+		sprintf ((char *) p, "%.2x", *s);
 	
 	ret = g_byte_array_new ();
-	g_byte_array_append (ret, sasl->service->url->user, strlen (sasl->service->url->user));
-	g_byte_array_append (ret, " ", 1);
+	g_byte_array_append (ret, (const unsigned gchar *) sasl->service->url->user, strlen (sasl->service->url->user));
+	g_byte_array_append (ret, (const unsigned gchar *) " ", 1);
 	g_byte_array_append (ret, md5asc, 32);
 	
 	sasl->authenticated = TRUE;
Index: camel-stream-buffer.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-stream-buffer.c,v
retrieving revision 1.29
diff -u -r1.29 camel-stream-buffer.c
--- camel-stream-buffer.c	6 Dec 2005 04:21:55 -0000	1.29
+++ camel-stream-buffer.c	19 Oct 2006 10:51:43 -0000
@@ -126,7 +126,7 @@
 		g_free(sbf->buf);
 	}
 	if (buf) {
-		sbf->buf = buf;
+		sbf->buf = (unsigned char *) buf;
 		sbf->flags |= BUF_USER;
 	} else {
 		sbf->buf = g_malloc(size);
@@ -253,7 +253,7 @@
 					bptr += bytes_read;
 				}
 			} else {
-				bytes_read = camel_stream_read(sbf->stream, sbf->buf, sbf->size);
+				bytes_read = camel_stream_read(sbf->stream, (char *) sbf->buf, sbf->size);
 				if (bytes_read>0) {
 					size_t bytes_used = bytes_read > n ? n : bytes_read;
 					sbf->ptr = sbf->buf;
@@ -312,7 +312,7 @@
 
 	/* if we've filled the buffer, write it out, reset buffer */
 	if (left == todo) {
-		if (stream_write_all(sbf->stream, sbf->buf, sbf->size) == -1)
+		if (stream_write_all(sbf->stream, (const char *) sbf->buf, sbf->size) == -1)
 			return -1;
 
 		sbf->ptr = sbf->buf;
@@ -340,7 +340,7 @@
 	if ((sbf->mode & CAMEL_STREAM_BUFFER_MODE) == CAMEL_STREAM_BUFFER_WRITE) {
 		size_t len = sbf->ptr - sbf->buf;
 		
-		if (camel_stream_write (sbf->stream, sbf->buf, len) == -1)
+		if (camel_stream_write (sbf->stream, (const char *) sbf->buf, len) == -1)
 			return -1;
 		
 		sbf->ptr = sbf->buf;
@@ -391,8 +391,8 @@
 	int bytes_read;
 
 	outptr = buf;
-	inptr = sbf->ptr;
-	inend = sbf->end;
+	inptr = (char *) sbf->ptr;
+	inend = (char *) sbf->end;
 	outend = buf+max-1;	/* room for NUL */
 
 	do {
@@ -401,25 +401,27 @@
 			*outptr++ = c;
 			if (c == '\n') {
 				*outptr = 0;
-				sbf->ptr = inptr;
+				sbf->ptr = (unsigned char *) inptr;
 				return outptr-buf;
 			}
 		}
 		if (outptr == outend)
 			break;
 
-		bytes_read = camel_stream_read (sbf->stream, sbf->buf, sbf->size);
+		bytes_read = camel_stream_read (sbf->stream, (char *) sbf->buf, sbf->size);
 		if (bytes_read == -1) {
 			if (buf == outptr)
 				return -1;
 			else
 				bytes_read = 0;
 		}
-		inptr = sbf->ptr = sbf->buf;
-		inend = sbf->end = sbf->buf + bytes_read;
+		sbf->ptr = sbf->buf;
+		sbf->end = sbf->buf + bytes_read;
+		inptr = (char *) sbf->ptr;
+		inend = (char *) sbf->end;
 	} while (bytes_read>0);
 
-	sbf->ptr = inptr;
+	sbf->ptr = (unsigned char *) inptr;
 	*outptr = 0;
 
 	return (int)(outptr - buf);
@@ -445,7 +447,7 @@
 	p = sbf->linebuf;
 
 	while (1) {
-		nread = camel_stream_buffer_gets (sbf, p, sbf->linesize - (p - sbf->linebuf));
+		nread = camel_stream_buffer_gets (sbf, (char *) p, sbf->linesize - (p - sbf->linebuf));
 		if (nread <=0) {
 			if (p > sbf->linebuf)
 				break;
@@ -467,5 +469,5 @@
 		p--;
 	p[0] = 0;
 
-	return g_strdup(sbf->linebuf);
+	return g_strdup((gchar *) sbf->linebuf);
 }
Index: camel-stream-vfs.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-stream-vfs.c,v
retrieving revision 1.4
diff -u -r1.4 camel-stream-vfs.c
--- camel-stream-vfs.c	5 Oct 2006 14:16:39 -0000	1.4
+++ camel-stream-vfs.c	19 Oct 2006 10:51:44 -0000
@@ -83,7 +83,7 @@
 {
 	CamelStreamVFS *stream_vfs = CAMEL_STREAM_VFS (object);
 
-	if (stream_vfs->handle != -1)
+	if (stream_vfs->handle != (gpointer) -1)
 		gnome_vfs_close (stream_vfs->handle);
 }
 
@@ -121,8 +121,7 @@
 {
 	CamelStreamVFS *stream_vfs;
 	off_t offset;
-	GnomeVFSResult result;
-	
+
 	if (!handle)
 		return NULL;
 
@@ -151,8 +150,8 @@
 {
 	GnomeVFSResult result;
 	GnomeVFSHandle *handle;
-	int vfs_flag;
-	
+	int vfs_flag = 0;
+
 	if (flags & O_WRONLY)
 		vfs_flag = vfs_flag | GNOME_VFS_OPEN_WRITE;
 	if (flags & O_RDONLY)
Index: camel-stream-vfs.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-stream-vfs.h,v
retrieving revision 1.1
diff -u -r1.1 camel-stream-vfs.h
--- camel-stream-vfs.h	25 May 2006 04:38:04 -0000	1.1
+++ camel-stream-vfs.h	19 Oct 2006 10:51:44 -0000
@@ -63,7 +63,7 @@
 
 /* public methods */
 CamelStream * camel_stream_vfs_new_with_uri            (const char *uri, int flags, mode_t mode);
-
+CamelStream * camel_stream_vfs_new_with_handle         (GnomeVFSHandle *handle);
 
 #ifdef __cplusplus
 }
Index: providers/nntp/camel-nntp-store-summary.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/nntp/camel-nntp-store-summary.c,v
retrieving revision 1.5
diff -u -r1.5 camel-nntp-store-summary.c
--- providers/nntp/camel-nntp-store-summary.c	12 Apr 2006 19:14:15 -0000	1.5
+++ providers/nntp/camel-nntp-store-summary.c	19 Oct 2006 10:51:45 -0000
@@ -249,7 +249,7 @@
 			} else {
 				if (c == '/')
 					c = dir_sep;
-				camel_utf8_putc(&f, c);
+				camel_utf8_putc((unsigned char **) &f, c);
 			}
 			break;
 		case 1:
@@ -259,11 +259,11 @@
 		case 2:
 			state = 0;
 			v |= hexnib (c);
-			camel_utf8_putc (&f, v);
+			camel_utf8_putc ((unsigned char **) &f, v);
 			break;
 		}
 	}
-	camel_utf8_putc (&f, c);
+	camel_utf8_putc ((unsigned char **) &f, c);
 	
 	/* merge old path part if required */
 	f = camel_utf8_utf7 (full);
Index: providers/nntp/camel-nntp-stream.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/nntp/camel-nntp-stream.c,v
retrieving revision 1.7
diff -u -r1.7 camel-nntp-stream.c
--- providers/nntp/camel-nntp-stream.c	15 Sep 2005 22:24:27 -0000	1.7
+++ providers/nntp/camel-nntp-stream.c	19 Oct 2006 10:51:46 -0000
@@ -58,7 +58,7 @@
 		memcpy(is->buf, is->ptr, left);
 		is->end = is->buf + left;
 		is->ptr = is->buf;
-		left = camel_stream_read(is->source, is->end, CAMEL_NNTP_STREAM_SIZE - (is->end - is->buf));
+		left = camel_stream_read(is->source, (char *) is->end, CAMEL_NNTP_STREAM_SIZE - (is->end - is->buf));
 		if (left > 0) {
 			is->end += left;
 			is->end[0] = '\n';


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]