Index: camel/camel-exchange-journal.c
===================================================================
--- camel/camel-exchange-journal.c	(revision 1287)
+++ camel/camel-exchange-journal.c	(working copy)
@@ -122,7 +122,7 @@ exchange_entry_load (CamelOfflineJournal
 	
 	entry = g_malloc0 (sizeof (CamelExchangeJournalEntry));
 	
-	if (camel_file_util_decode_uint32 (in, &entry->type) == -1)
+	if (camel_file_util_decode_uint32 (in, (guint32 *) &entry->type) == -1)
 		goto exception;
 	
 	switch (entry->type) {
Index: camel/camel-exchange-folder.c
===================================================================
--- camel/camel-exchange-folder.c	(revision 1287)
+++ camel/camel-exchange-folder.c	(working copy)
@@ -263,7 +263,8 @@ append_message_data (CamelFolder *folder
 		stream_cache = camel_data_cache_add (exch->cache,
 						     "cache", new_uid, NULL);
 		if (stream_cache) {
-			camel_stream_write (stream_cache, message->data,
+			camel_stream_write (stream_cache,
+					    (char *) message->data,
 					    message->len);
 			camel_stream_flush (stream_cache);
 			camel_object_unref (CAMEL_OBJECT (stream_cache));
@@ -422,7 +423,7 @@ get_message_data (CamelFolder *folder, c
 		return NULL;
 	}
 
-	camel_stream_write (stream, ba->data, ba->len);
+	camel_stream_write (stream, (char *) ba->data, ba->len);
 	camel_stream_flush (stream);
 	camel_object_unref (CAMEL_OBJECT (stream));
 
Index: camel/camel-stub-marshal.c
===================================================================
--- camel/camel-stub-marshal.c	(revision 1287)
+++ camel/camel-stub-marshal.c	(working copy)
@@ -205,7 +205,7 @@ encode_string (CamelStubMarshal *marshal
 
 	len = strlen (str);
 	encode_uint32 (marshal, len + 1);
-	g_byte_array_append (marshal->out, str, len);
+	g_byte_array_append (marshal->out, (guint8 *) str, len);
 }
 
 static int
@@ -407,7 +407,7 @@ camel_stub_marshal_decode_bytes (CamelSt
 
 	*ba = g_byte_array_new ();
 	g_byte_array_set_size (*ba, len);
-	if (len > 0 && marshal_read (marshal, (*ba)->data, len) != len) {
+	if (len > 0 && marshal_read (marshal, (char *) (*ba)->data, len) != len) {
 		g_byte_array_free (*ba, TRUE);
 		*ba = NULL;
 		return -1;
@@ -452,7 +452,7 @@ camel_stub_marshal_flush (CamelStubMarsh
 	marshal->out->data[2] = (left >> 16) & 0xFF;
 	marshal->out->data[3] = (left >> 24) & 0xFF;
 	
-	if (camel_write (marshal->fd, marshal->out->data, marshal->out->len) == -1) {
+	if (camel_write (marshal->fd, (char *) marshal->out->data, marshal->out->len) == -1) {
 		close (marshal->fd);
 		marshal->fd = -1;
 		return -1;
Index: camel/camel-stub.c
===================================================================
--- camel/camel-stub.c	(revision 1287)
+++ camel/camel-stub.c	(working copy)
@@ -438,7 +438,7 @@ stub_send_internal (CamelStub *stub, Cam
 				case CAMEL_STUB_ARG_UINT32ARRAY:
 				{
 					GArray **arr = va_arg (ap, GArray **);
-					int i, len, unread_count;
+					guint32 i, len, unread_count;
 					status = camel_stub_marshal_decode_uint32 (stub->cmd, &len);
 					if (status == -1)
 						break;
Index: mail/mail-utils.c
===================================================================
--- mail/mail-utils.c	(revision 1287)
+++ mail/mail-utils.c	(working copy)
@@ -310,7 +310,7 @@ mail_util_stickynote_to_rfc822 (E2kPrope
  * Return value: %TRUE if we successfully demangled @body (in place).
  **/
 gboolean
-mail_util_demangle_delegated_meeting (GByteArray *body,
+mail_util_demangle_delegated_meeting (GString *body,
 				      const char *delegator_cn,
 				      const char *delegator_email,
 				      const char *delegator_cal_uri)
@@ -321,10 +321,7 @@ mail_util_demangle_delegated_meeting (GB
 	char *delegator_mailto, *ical_str;
 	int oldlen, newlen;
 
-	g_byte_array_append (body, "", 1);
-	body->len--;
-
-	vstart = strstr (body->data, "BEGIN:VCALENDAR");
+	vstart = strstr (body->str, "BEGIN:VCALENDAR");
 	if (!vstart)
 		return FALSE;
 	vend = strstr (vstart, "END:VCALENDAR");
@@ -383,9 +380,9 @@ mail_util_demangle_delegated_meeting (GB
 	if (newlen < oldlen) {
 		memcpy (vstart, ical_str, newlen);
 		memcpy (vstart + newlen, vend, strlen (vend));
-		g_byte_array_set_size (body, body->len + newlen - oldlen);
+		g_string_set_size (body, body->len + newlen - oldlen);
 	} else {
-		g_byte_array_set_size (body, body->len + newlen - oldlen);
+		g_string_set_size (body, body->len + newlen - oldlen);
 		memmove (vstart + newlen, vend, strlen (vend));
 		memcpy (vstart, ical_str, newlen);
 	}
Index: mail/mail-utils.h
===================================================================
--- mail/mail-utils.h	(revision 1287)
+++ mail/mail-utils.h	(working copy)
@@ -20,7 +20,7 @@ guint32  mail_util_props_to_camel_flags 
 
 char *   mail_util_extract_transport_headers (E2kProperties *props);
 
-gboolean mail_util_demangle_delegated_meeting (GByteArray *body,
+gboolean mail_util_demangle_delegated_meeting (GString *body,
 					       const char *delegator_cn,
 					       const char *delegator_email,
 					       const char *delegator_cal_uri);
Index: mail/mail-stub-exchange.c
===================================================================
--- mail/mail-stub-exchange.c	(revision 1287)
+++ mail/mail-stub-exchange.c	(working copy)
@@ -1893,7 +1893,7 @@ build_message_from_document (E2kContext 
 	E2kHTTPStatus status;
 	E2kResult *results;
 	int nresults = 0;
-	GByteArray *message;
+	GString *message;
 	char *headers;
 
 	status = e2k_context_propfind (ctx, op, uri,
@@ -1907,15 +1907,15 @@ build_message_from_document (E2kContext 
 
 	headers = mail_util_mapi_to_smtp_headers (results[0].props);
 
-	message = g_byte_array_new ();
-	g_byte_array_append (message, headers, strlen (headers));
+	message = g_string_new (headers);
+	g_string_append_len (message, *body, *len);
+
 	g_free (headers);
-	g_byte_array_append (message, *body, *len);
 	g_free (*body);
 
-	*body = (char *)message->data;
 	*len = message->len;
-	g_byte_array_free (message, FALSE);
+	*body = g_string_free (message, FALSE);
+
 	e2k_results_free (results, nresults);
 	return status;
 }
@@ -1926,7 +1926,6 @@ unmangle_delegated_meeting_request (Mail
 				    char **body, int *len)
 {
 	const char *prop = PR_RCVD_REPRESENTING_EMAIL_ADDRESS;
-	GByteArray *message;
 	char *delegator_dn, *delegator_uri;
 	ExchangeAccount *account;
 	E2kGlobalCatalog *gc;
@@ -1974,16 +1973,17 @@ unmangle_delegated_meeting_request (Mail
 	if (delegator_uri) {
 		folder = exchange_account_get_folder (account, delegator_uri);
 		if (folder) {
-			message = g_byte_array_new ();
-			g_byte_array_append (message, *body, *len);
+			GString *message;
+
+			message = g_string_new_len (*body, *len);
 			mail_util_demangle_delegated_meeting (
 				message, entry->display_name,
 				entry->email,
 				e_folder_get_physical_uri (folder));
 			g_free (*body);
-			*body = (char *)message->data;
+			*body = message->str;
 			*len = message->len;
-			g_byte_array_free (message, FALSE);
+			*body = g_string_free (message, FALSE);
 		}
 		g_free (delegator_uri);
 	}
Index: mail/mail-stub.c
===================================================================
--- mail/mail-stub.c	(revision 1287)
+++ mail/mail-stub.c	(working copy)
@@ -202,7 +202,7 @@ connection_handler (GIOChannel *source, 
 		d(printf("APPEND_MESSAGE %s %lu %s\n", folder_name,
 			 (gulong)flags, subject));
 		g_object_ref (stub);
-		MS_CLASS (stub)->append_message (stub, folder_name, flags, subject, body->data, body->len);
+		MS_CLASS (stub)->append_message (stub, folder_name, flags, subject, (char *) body->data, body->len);
 		g_free (folder_name);
 		g_free (subject);
 		g_byte_array_free (body, TRUE);
@@ -345,7 +345,7 @@ connection_handler (GIOChannel *source, 
 			 from, recips->len));
 		g_object_ref (stub);
 		MS_CLASS (stub)->send_message (stub, from, recips,
-					       body->data, body->len);
+					       (char *) body->data, body->len);
 		g_free (from);
 		free_string_array (recips);
 		g_byte_array_free (body, TRUE);
@@ -547,7 +547,7 @@ mail_stub_read_args (MailStub *stub, ...
 		case CAMEL_STUB_ARG_UINT32ARRAY:
 		{
 			GArray **arr = va_arg (ap, GArray **);
-			int i, len, unread_count;
+			guint32 i, len, unread_count;
 			status = camel_stub_marshal_decode_uint32 (stub->cmd, &len);
 			if (status == -1)
 				break;
@@ -641,7 +641,7 @@ mail_stub_return_data (MailStub *stub, C
 			int len = va_arg (ap, int);
 			GByteArray ba;
 
-			ba.data = data;
+			ba.data = (guint8 *) data;
 			ba.len = len;
 			camel_stub_marshal_encode_bytes (marshal, &ba);
 			break;
Index: addressbook/e-book-backend-exchange.c
===================================================================
--- addressbook/e-book-backend-exchange.c	(revision 1287)
+++ addressbook/e-book-backend-exchange.c	(working copy)
@@ -1273,7 +1273,7 @@ do_put (EBookBackendExchange *be, EDataB
 	body = build_message (hier->owner_name, hier->owner_email,
 			      subject, note, photo);
 	status = e2k_context_put (be->priv->ctx, NULL, uri, "message/rfc822",
-				  body->data, body->len, NULL);
+				  (char *) body->data, body->len, NULL);
 	g_byte_array_free (body, TRUE);
 
 	return status;
Index: addressbook/e-book-backend-gal.c
===================================================================
--- addressbook/e-book-backend-gal.c	(revision 1287)
+++ addressbook/e-book-backend-gal.c	(working copy)
@@ -138,7 +138,7 @@ static EContact *build_contact_from_entr
 
 static void manager_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op);
 
-static void member_populate (EContact *contact, char **values);
+static void member_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op);
 
 static void last_mod_time_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op);
 
@@ -1186,7 +1186,7 @@ manager_populate(EContact *contact, char
 				str += len;
 
 static void
-member_populate (EContact *contact, char **values)
+member_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op)
 {
 	int i;
 	gchar **member_info;
@@ -1643,10 +1643,12 @@ start_book_view (EBookBackend  *backend,
 	case GNOME_Evolution_Addressbook_MODE_REMOTE:
 		printf("Mode:Remote\n");
 		if (bl->priv->marked_for_offline && bl->priv->file_db) {
-			char *query = e_data_book_view_get_card_query (view);
+			const char *query;
 			GPtrArray *ids = NULL;
+
 			printf("Marked for offline and cache present\n");
 
+			query = e_data_book_view_get_card_query (view);
 			status = build_query (bl, e_data_book_view_get_card_query (view),
 					      &ldap_query);
 			if (status != GNOME_Evolution_Addressbook_Success || !ldap_query) {
Index: addressbook/e-book-backend-db-cache.c
===================================================================
--- addressbook/e-book-backend-db-cache.c	(revision 1287)
+++ addressbook/e-book-backend-db-cache.c	(working copy)
@@ -211,9 +211,13 @@ e_book_backend_db_cache_add_contact (DB 
 
 	uid = e_contact_get_const (contact, E_CONTACT_UID);
 	if (!uid) {
+		char *name, *email;
+
+		name = e_contact_get (contact, E_CONTACT_GIVEN_NAME);
+		email = e_contact_get (contact, E_CONTACT_EMAIL_1);
 		printf ("no uid\n");
-		printf("name:%s, email:%s\n", e_contact_get (contact, E_CONTACT_GIVEN_NAME), e_contact_get (contact, E_CONTACT_EMAIL_1));
-		return NULL; 
+		printf ("name:%s, email:%s\n", name, email);
+		return FALSE; 
 	}
 	string_to_dbt (uid, &uid_dbt);
 	
Index: calendar/e-cal-backend-exchange.c
===================================================================
--- calendar/e-cal-backend-exchange.c	(revision 1287)
+++ calendar/e-cal-backend-exchange.c	(working copy)
@@ -1173,7 +1173,7 @@ set_default_timezone (ECalBackendSync *b
 static void
 start_query (ECalBackend *backend, EDataCalView *view)
 {
-	char *sexp = NULL;
+	const char *sexp = NULL;
 	ECalBackendSyncStatus status = GNOME_Evolution_Calendar_OtherError;
 	GList *m, *objects = NULL;
 
@@ -1573,7 +1573,7 @@ get_attachment (ECalBackendExchange *cbe
 				attach_data = g_memdup (stream_mem->buffer->data, stream_mem->buffer->len);
 				attach_file = g_strdup_printf ("%s/%s-%s", cbex->priv->local_attachment_store, uid, filename);
 				// Attach
-				attach_file_url = save_attach_file (attach_file, attach_data, stream_mem->buffer->len);
+				attach_file_url = save_attach_file (attach_file, (char *) attach_data, stream_mem->buffer->len);
 				g_free (attach_data);
 				g_free (attach_file);
 				d(printf ("attach file name : %s\n", attach_file_url));
Index: calendar/e-cal-backend-exchange-tasks.c
===================================================================
--- calendar/e-cal-backend-exchange-tasks.c	(revision 1287)
+++ calendar/e-cal-backend-exchange-tasks.c	(working copy)
@@ -865,6 +865,8 @@ get_changed_tasks (ECalBackendExchange *
 
 	while ((result = e2k_result_iter_next (iter))) {
 		GByteArray *ical_data;
+
+		/* XXX e2k_properties_get_prop() ought to return a GString. */
 		ical_data = e2k_properties_get_prop (result->props, PR_INTERNET_CONTENT);
 		if (!ical_data) {
 			g_ptr_array_add (hrefs, g_strdup (result->href));
@@ -876,7 +878,7 @@ get_changed_tasks (ECalBackendExchange *
 		
 		e_cal_backend_exchange_cache_lock (cbex);
 		ecalbexcomp = get_exchange_comp (cbex, uid);
-		attachment_list = get_attachment (cbex, uid, ical_data->data, ical_data->len);
+		attachment_list = get_attachment (cbex, uid, (char *) ical_data->data, ical_data->len);
 		if (attachment_list) {
 			ecomp = e_cal_component_new ();
 			e_cal_component_set_icalcomponent (ecomp, icalcomponent_new_clone (ecalbexcomp->icomp));
Index: calendar/e-cal-backend-exchange-calendar.c
===================================================================
--- calendar/e-cal-backend-exchange-calendar.c	(revision 1287)
+++ calendar/e-cal-backend-exchange-calendar.c	(working copy)
@@ -444,6 +444,7 @@ get_changed_events (ECalBackendExchange 
 		GByteArray *ical_data;
 		status_tracking = EX_NO_RECEIPTS;
 
+		/* XXX e2k_properties_get_prop() ought to return a GString. */
 		ical_data = e2k_properties_get_prop (result->props, PR_INTERNET_CONTENT);
 		if (!ical_data) {
 			/* We didn't get the body, so postpone. */
@@ -470,7 +471,7 @@ get_changed_events (ECalBackendExchange 
 		/* The icaldata already has the attachment. So no need to
 			re-fetch it from the server. */
 		add_ical (cbex, result->href, modtime, uid,
-			  ical_data->data, ical_data->len, status_tracking);
+			  (char *) ical_data->data, ical_data->len, status_tracking);
 	}
 	status = e2k_result_iter_free (iter);
 
@@ -1026,7 +1027,6 @@ modify_object (ECalBackendSync *backend,
 	       char **old_object, char **new_object)
 {
 	ECalBackendSyncStatus status;
-	ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
 
 	d(printf ("ecbexc_modify_object(%p, %p, %d, %s)", backend, cal, mod, *old_object ? *old_object : NULL));
 
@@ -1604,7 +1604,6 @@ receive_objects (ECalBackendSync *backen
 									     old_object, NULL);
 					e_cal_component_free_id (id);
 				} else {
-					struct icaltimetype time_rid;
 					char *new_object = NULL;
 					CalObjModType mod = CALOBJ_MOD_ALL;
 					
@@ -1628,7 +1627,7 @@ receive_objects (ECalBackendSync *backen
 				g_free (old_object);
 			} else if (!check_owner_partstatus_for_declined (backend, subcomp)) {
 				d(printf ("object : %s .. not found in the cache\n", uid));
-				char *returned_uid, *old, *object;
+				char *returned_uid, *object;
 				icalobj = (char *) icalcomponent_as_ical_string (subcomp);
 				d(printf ("Create a new object : %s\n", icalobj));
 				
@@ -2241,6 +2240,7 @@ get_free_busy (ECalBackendSync *backend,
 		icalproperty *organizer;
 		xmlNode *node, *fbdata;
 		char *org_uri, *calobj;
+		char *content;
 
 		fbdata = e2k_xml_find_in (item, item, "fbdata");
 		if (!fbdata || !fbdata->children || !fbdata->children->content)
@@ -2257,7 +2257,8 @@ get_free_busy (ECalBackendSync *backend,
 		if (node && node->children && node->children->content) {
 			icalparameter *cn;
 
-			cn = icalparameter_new_cn (node->children->content);
+			content = (char *) node->children->content;
+			cn = icalparameter_new_cn (content);
 			icalproperty_add_parameter (organizer, cn);
 		}
 
@@ -2266,7 +2267,8 @@ get_free_busy (ECalBackendSync *backend,
 		icalcomponent_set_dtend (vfb, icaltime_from_timet_with_zone (end, 0, utc));
 		icalcomponent_add_property (vfb, organizer);
 
-		set_freebusy_info (vfb, fbdata->children->content, start);
+		content = (char *) fbdata->children->content;
+		set_freebusy_info (vfb, content, start);
 
 		calobj = icalcomponent_as_ical_string (vfb);
 		*freebusy = g_list_prepend (*freebusy, g_strdup (calobj));
