[evolution-patches] Compilation fixes for Camel, first set



Trying to get work upstream.

Feel free to commit. The ChangeLog entry is embedded in the patch this
time.

The files camel-mime-filter-basic.c camel-block-file.c
broken-date-parser.c are fixed in this patch.

-- 
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
--- /home/pvanhoof/repos/gnome/cvs/evolution-data-server/camel/broken-date-parser.c	2005-09-15 14:08:34.000000000 +0200
+++ broken-date-parser.c	2006-10-17 10:03:06.000000000 +0200
@@ -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;
 			}
 		}
--- /home/pvanhoof/repos/gnome/cvs/evolution-data-server/camel/camel-block-file.c	2006-04-12 21:14:13.000000000 +0200
+++ camel-block-file.c	2006-10-17 10:03:46.000000000 +0200
@@ -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);
--- /home/pvanhoof/repos/gnome/cvs/evolution-data-server/camel/camel-mime-filter-basic.c	2006-04-12 21:14:13.000000000 +0200
+++ camel-mime-filter-basic.c	2006-10-17 10:07:39.000000000 +0200
@@ -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, &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, &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, &f->state, (gint*) &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, &f->state, (guint32*) &f->save);
 		} else {
 			newlen = 0;
 		}
--- /home/pvanhoof/repos/gnome/cvs/evolution-data-server/camel/ChangeLog	2006-10-05 16:16:39.000000000 +0200
+++ ChangeLog	2006-10-17 10:09:15.000000000 +0200
@@ -1,3 +1,8 @@
+2006-10-17  Philip Van Hoof  <pvanhoof gnome org>
+
+	* camel-mime-filter-basic.c camel-block-file.c broken-date-parser.c:
+	Compilation warning fixes
+	
 2006-10-05  Tor Lillqvist  <tml novell com>
 
 	Fixes from Steffen Eschenbacher:


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