rpms/evolution-connector/devel evolution-exchange-2.9.6-fix-compiler-warnings.patch, 1.3, 1.4

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Feb 13 22:16:15 UTC 2007


Author: mbarnes

Update of /cvs/dist/rpms/evolution-connector/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv8047

Modified Files:
	evolution-exchange-2.9.6-fix-compiler-warnings.patch 
Log Message:
Sneak a couple more 64-bit fixes in.


evolution-exchange-2.9.6-fix-compiler-warnings.patch:
 addressbook/e-book-backend-db-cache.c      |    8 ++++++--
 addressbook/e-book-backend-exchange.c      |    6 ++----
 addressbook/e-book-backend-gal.c           |    8 +++++---
 calendar/e-cal-backend-exchange-calendar.c |   14 ++++++++------
 calendar/e-cal-backend-exchange-tasks.c    |    4 +++-
 calendar/e-cal-backend-exchange.c          |    8 +++++---
 camel/camel-exchange-folder.c              |    5 +++--
 camel/camel-exchange-journal.c             |    2 +-
 camel/camel-exchange-store.c               |    2 +-
 camel/camel-stub-marshal.c                 |    6 +++---
 camel/camel-stub.c                         |    2 +-
 mail/mail-stub-exchange.c                  |   22 +++++++++++-----------
 mail/mail-stub.c                           |    8 ++++----
 mail/mail-utils.c                          |   17 +++++++----------
 mail/mail-utils.h                          |    2 +-
 15 files changed, 61 insertions(+), 53 deletions(-)

Index: evolution-exchange-2.9.6-fix-compiler-warnings.patch
===================================================================
RCS file: /cvs/dist/rpms/evolution-connector/devel/evolution-exchange-2.9.6-fix-compiler-warnings.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- evolution-exchange-2.9.6-fix-compiler-warnings.patch	12 Feb 2007 22:03:47 -0000	1.3
+++ evolution-exchange-2.9.6-fix-compiler-warnings.patch	13 Feb 2007 22:16:12 -0000	1.4
@@ -1,148 +1,233 @@
---- evolution-exchange-2.9.91/mail/mail-utils.h.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
-+++ evolution-exchange-2.9.91/mail/mail-utils.h	2007-02-12 14:17:08.000000000 -0500
-@@ -20,7 +20,7 @@
+--- evolution-exchange-2.9.91/camel/camel-stub-marshal.c.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
++++ evolution-exchange-2.9.91/camel/camel-stub-marshal.c	2007-02-13 04:30:47.000000000 -0500
+@@ -205,7 +205,7 @@
  
- char *   mail_util_extract_transport_headers (E2kProperties *props);
+ 	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);
+ }
  
--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);
---- evolution-exchange-2.9.91/mail/mail-stub.c.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
-+++ evolution-exchange-2.9.91/mail/mail-stub.c	2007-02-12 14:17:08.000000000 -0500
-@@ -202,7 +202,7 @@
- 		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 @@
- 			 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 @@
- 		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 @@
- 			int len = va_arg (ap, int);
- 			GByteArray ba;
+ static int
+@@ -407,7 +407,7 @@
  
--			ba.data = data;
-+			ba.data = (guint8 *) data;
- 			ba.len = len;
- 			camel_stub_marshal_encode_bytes (marshal, &ba);
- 			break;
---- evolution-exchange-2.9.91/mail/mail-stub-exchange.c.fix-compiler-warnings	2007-01-08 11:16:29.000000000 -0500
-+++ evolution-exchange-2.9.91/mail/mail-stub-exchange.c	2007-02-12 14:17:08.000000000 -0500
-@@ -1893,7 +1893,7 @@
- 	E2kHTTPStatus status;
- 	E2kResult *results;
- 	int nresults = 0;
--	GByteArray *message;
-+	GString *message;
- 	char *headers;
+ 	*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 @@
+ 	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;
+--- evolution-exchange-2.9.91/camel/camel-exchange-journal.c.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
++++ evolution-exchange-2.9.91/camel/camel-exchange-journal.c	2007-02-13 04:30:47.000000000 -0500
+@@ -122,7 +122,7 @@
+ 	
+ 	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) {
+--- evolution-exchange-2.9.91/camel/camel-stub.c.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
++++ evolution-exchange-2.9.91/camel/camel-stub.c	2007-02-13 04:30:47.000000000 -0500
+@@ -438,7 +438,7 @@
+ 				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;
+--- evolution-exchange-2.9.91/camel/camel-exchange-store.c.fix-compiler-warnings	2007-01-08 11:06:40.000000000 -0500
++++ evolution-exchange-2.9.91/camel/camel-exchange-store.c	2007-02-13 04:30:47.000000000 -0500
+@@ -512,7 +512,7 @@
+ 		gchar *key;
+ 		g_mutex_lock (exch->folders_lock);
+ 		if (g_hash_table_lookup_extended (exch->folders, folder_name,
+-						  (gpointer *) &key, NULL)) {
++						  (gpointer) &key, NULL)) {
+ 			g_hash_table_remove (exch->folders, key);
+ 			g_free (key);
+ 		}
+--- evolution-exchange-2.9.91/camel/camel-exchange-folder.c.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
++++ evolution-exchange-2.9.91/camel/camel-exchange-folder.c	2007-02-13 04:30:47.000000000 -0500
+@@ -263,7 +263,8 @@
+ 		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 @@
+ 		return NULL;
+ 	}
  
- 	status = e2k_context_propfind (ctx, op, uri,
-@@ -1907,15 +1907,15 @@
+-	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));
  
- 	headers = mail_util_mapi_to_smtp_headers (results[0].props);
+--- evolution-exchange-2.9.91/calendar/e-cal-backend-exchange-calendar.c.fix-compiler-warnings	2007-01-08 10:51:45.000000000 -0500
++++ evolution-exchange-2.9.91/calendar/e-cal-backend-exchange-calendar.c	2007-02-13 04:30:47.000000000 -0500
+@@ -444,6 +444,7 @@
+ 		GByteArray *ical_data;
+ 		status_tracking = EX_NO_RECEIPTS;
  
--	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);
++		/* 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 @@
+ 		/* 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);
  
--	*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 @@
- 				    char **body, int *len)
+@@ -1026,7 +1027,6 @@
+ 	       char **old_object, char **new_object)
  {
- 	const char *prop = PR_RCVD_REPRESENTING_EMAIL_ADDRESS;
--	GByteArray *message;
- 	char *delegator_dn, *delegator_uri;
- 	ExchangeAccount *account;
- 	E2kGlobalCatalog *gc;
-@@ -1974,16 +1973,17 @@
- 	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);
- 	}
---- evolution-exchange-2.9.91/mail/mail-utils.c.fix-compiler-warnings	2007-02-12 16:51:15.000000000 -0500
-+++ evolution-exchange-2.9.91/mail/mail-utils.c	2007-02-12 17:01:09.000000000 -0500
-@@ -207,11 +207,11 @@
- 		ctend = strchr (ctstart, '\n');
+ 	ECalBackendSyncStatus status;
+-	ECalBackendExchange *cbex = E_CAL_BACKEND_EXCHANGE (backend);
  
- 		headers = g_strdup_printf ("%.*s\nContent-Type: text/plain; charset=\"UTF-8\"%.*s\n\n",
--					   ctstart - hstart, hstart,
--					   hend - ctend, ctend);
-+					   (int) (ctstart - hstart), hstart,
-+					   (int) (hend - ctend), ctend);
- 	} else {
- 		headers = g_strdup_printf ("%.*s\nContent-Type: text/plain; charset=\"UTF-8\"\n\n\n",
--					   hend - hstart, hstart);
-+					   (int) (hend - hstart), hstart);
- 	}
+ 	d(printf ("ecbexc_modify_object(%p, %p, %d, %s)", backend, cal, mod, *old_object ? *old_object : NULL));
  
- 	return headers;
---- evolution-exchange-2.9.91/addressbook/e-book-backend-gal.c.fix-compiler-warnings	2007-01-18 08:16:25.000000000 -0500
-+++ evolution-exchange-2.9.91/addressbook/e-book-backend-gal.c	2007-02-12 14:17:08.000000000 -0500
-@@ -138,7 +138,7 @@
+@@ -1604,7 +1604,6 @@
+ 									     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 @@
+ 				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 @@
+ 		icalproperty *organizer;
+ 		xmlNode *node, *fbdata;
+ 		char *org_uri, *calobj;
++		char *content;
  
- static void manager_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op);
+ 		fbdata = e2k_xml_find_in (item, item, "fbdata");
+ 		if (!fbdata || !fbdata->children || !fbdata->children->content)
+@@ -2257,7 +2257,8 @@
+ 		if (node && node->children && node->children->content) {
+ 			icalparameter *cn;
  
--static void member_populate (EContact *contact, char **values);
-+static void member_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op);
+-			cn = icalparameter_new_cn (node->children->content);
++			content = (char *) node->children->content;
++			cn = icalparameter_new_cn (content);
+ 			icalproperty_add_parameter (organizer, cn);
+ 		}
  
- static void last_mod_time_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op);
+@@ -2266,7 +2267,8 @@
+ 		icalcomponent_set_dtend (vfb, icaltime_from_timet_with_zone (end, 0, utc));
+ 		icalcomponent_add_property (vfb, organizer);
  
-@@ -1186,7 +1186,7 @@
- 				str += len;
+-		set_freebusy_info (vfb, fbdata->children->content, start);
++		content = (char *) fbdata->children->content;
++		set_freebusy_info (vfb, content, start);
  
- static void
--member_populate (EContact *contact, char **values)
-+member_populate (EContact *contact, char **values, EBookBackendGAL *bl, E2kOperation *op)
+ 		calobj = icalcomponent_as_ical_string (vfb);
+ 		*freebusy = g_list_prepend (*freebusy, g_strdup (calobj));
+--- evolution-exchange-2.9.91/calendar/e-cal-backend-exchange.c.fix-compiler-warnings	2007-01-08 10:51:45.000000000 -0500
++++ evolution-exchange-2.9.91/calendar/e-cal-backend-exchange.c	2007-02-13 04:30:47.000000000 -0500
+@@ -25,6 +25,7 @@
+ #include <sys/stat.h>
+ #include <sys/fcntl.h>
+ 
++#include <errno.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <libedataserver/e-time-utils.h>
+@@ -170,7 +171,8 @@
+ 	end = strrchr (cbex->priv->object_cache_file, '/');
+ 	storage_dir = g_strndup (cbex->priv->object_cache_file, end - cbex->priv->object_cache_file);
+ 	if (lstat(cbex->priv->local_attachment_store , &buf) < 0) {
+-		symlink (storage_dir, cbex->priv->local_attachment_store);
++		if (symlink (storage_dir, cbex->priv->local_attachment_store) < 0)
++			g_warning ("%s: symlink() failed: %s", G_STRFUNC, g_strerror (errno));
+ 	}
+ 	g_free (storage_dir);
+ 	g_free (mangled_uri);
+@@ -1173,7 +1175,7 @@
+ 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 +1575,7 @@
+ 				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));
+--- evolution-exchange-2.9.91/calendar/e-cal-backend-exchange-tasks.c.fix-compiler-warnings	2007-01-08 10:51:45.000000000 -0500
++++ evolution-exchange-2.9.91/calendar/e-cal-backend-exchange-tasks.c	2007-02-13 04:30:47.000000000 -0500
+@@ -865,6 +865,8 @@
+ 
+ 	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 @@
+ 		
+ 		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));
+--- evolution-exchange-2.9.91/addressbook/e-book-backend-gal.c.fix-compiler-warnings	2007-01-18 08:16:25.000000000 -0500
++++ evolution-exchange-2.9.91/addressbook/e-book-backend-gal.c	2007-02-13 04:30:47.000000000 -0500
+@@ -138,7 +138,7 @@
+ 
+ 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 @@
+ 				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;
@@ -161,7 +246,7 @@
  					      &ldap_query);
  			if (status != GNOME_Evolution_Addressbook_Success || !ldap_query) {
 --- evolution-exchange-2.9.91/addressbook/e-book-backend-db-cache.c.fix-compiler-warnings	2007-01-18 08:16:25.000000000 -0500
-+++ evolution-exchange-2.9.91/addressbook/e-book-backend-db-cache.c	2007-02-12 14:17:08.000000000 -0500
++++ evolution-exchange-2.9.91/addressbook/e-book-backend-db-cache.c	2007-02-13 04:30:47.000000000 -0500
 @@ -211,9 +211,13 @@
  
  	uid = e_contact_get_const (contact, E_CONTACT_UID);
@@ -179,7 +264,7 @@
  	string_to_dbt (uid, &uid_dbt);
  	
 --- evolution-exchange-2.9.91/addressbook/e-book-backend-exchange.c.fix-compiler-warnings	2007-01-08 10:51:44.000000000 -0500
-+++ evolution-exchange-2.9.91/addressbook/e-book-backend-exchange.c	2007-02-12 14:17:08.000000000 -0500
++++ evolution-exchange-2.9.91/addressbook/e-book-backend-exchange.c	2007-02-13 04:30:47.000000000 -0500
 @@ -1273,7 +1273,7 @@
  	body = build_message (hier->owner_name, hier->owner_email,
  			      subject, note, photo);
@@ -207,216 +292,164 @@
  			}
  
  			if (changed) {
---- evolution-exchange-2.9.91/calendar/e-cal-backend-exchange-tasks.c.fix-compiler-warnings	2007-01-08 10:51:45.000000000 -0500
-+++ evolution-exchange-2.9.91/calendar/e-cal-backend-exchange-tasks.c	2007-02-12 14:17:08.000000000 -0500
-@@ -865,6 +865,8 @@
- 
- 	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 @@
- 		
- 		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));
---- evolution-exchange-2.9.91/calendar/e-cal-backend-exchange.c.fix-compiler-warnings	2007-01-08 10:51:45.000000000 -0500
-+++ evolution-exchange-2.9.91/calendar/e-cal-backend-exchange.c	2007-02-12 14:17:08.000000000 -0500
-@@ -25,6 +25,7 @@
- #include <sys/stat.h>
- #include <sys/fcntl.h>
+--- evolution-exchange-2.9.91/mail/mail-stub-exchange.c.fix-compiler-warnings	2007-01-08 11:16:29.000000000 -0500
++++ evolution-exchange-2.9.91/mail/mail-stub-exchange.c	2007-02-13 04:30:47.000000000 -0500
+@@ -1893,7 +1893,7 @@
+ 	E2kHTTPStatus status;
+ 	E2kResult *results;
+ 	int nresults = 0;
+-	GByteArray *message;
++	GString *message;
+ 	char *headers;
  
-+#include <errno.h>
- #include <string.h>
- #include <unistd.h>
- #include <libedataserver/e-time-utils.h>
-@@ -170,7 +171,8 @@
- 	end = strrchr (cbex->priv->object_cache_file, '/');
- 	storage_dir = g_strndup (cbex->priv->object_cache_file, end - cbex->priv->object_cache_file);
- 	if (lstat(cbex->priv->local_attachment_store , &buf) < 0) {
--		symlink (storage_dir, cbex->priv->local_attachment_store);
-+		if (symlink (storage_dir, cbex->priv->local_attachment_store) < 0)
-+			g_warning ("%s: symlink() failed: %s", G_STRFUNC, g_strerror (errno));
- 	}
- 	g_free (storage_dir);
- 	g_free (mangled_uri);
-@@ -1173,7 +1175,7 @@
- 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;
+ 	status = e2k_context_propfind (ctx, op, uri,
+@@ -1907,15 +1907,15 @@
  
-@@ -1573,7 +1575,7 @@
- 				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));
---- evolution-exchange-2.9.91/calendar/e-cal-backend-exchange-calendar.c.fix-compiler-warnings	2007-01-08 10:51:45.000000000 -0500
-+++ evolution-exchange-2.9.91/calendar/e-cal-backend-exchange-calendar.c	2007-02-12 14:17:08.000000000 -0500
-@@ -444,6 +444,7 @@
- 		GByteArray *ical_data;
- 		status_tracking = EX_NO_RECEIPTS;
+ 	headers = mail_util_mapi_to_smtp_headers (results[0].props);
  
-+		/* 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 @@
- 		/* 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);
+-	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);
  
-@@ -1026,7 +1027,6 @@
- 	       char **old_object, char **new_object)
+-	*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 @@
+ 				    char **body, int *len)
  {
- 	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 @@
- 									     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 @@
- 				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 @@
- 		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 @@
- 		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 @@
- 		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));
---- evolution-exchange-2.9.91/camel/camel-exchange-store.c.fix-compiler-warnings	2007-01-08 11:06:40.000000000 -0500
-+++ evolution-exchange-2.9.91/camel/camel-exchange-store.c	2007-02-12 14:17:08.000000000 -0500
-@@ -512,7 +512,7 @@
- 		gchar *key;
- 		g_mutex_lock (exch->folders_lock);
- 		if (g_hash_table_lookup_extended (exch->folders, folder_name,
--						  (gpointer *) &key, NULL)) {
-+						  (gpointer) &key, NULL)) {
- 			g_hash_table_remove (exch->folders, key);
- 			g_free (key);
+ 	const char *prop = PR_RCVD_REPRESENTING_EMAIL_ADDRESS;
+-	GByteArray *message;
+ 	char *delegator_dn, *delegator_uri;
+ 	ExchangeAccount *account;
+ 	E2kGlobalCatalog *gc;
+@@ -1974,16 +1973,17 @@
+ 	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);
  		}
---- evolution-exchange-2.9.91/camel/camel-stub.c.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
-+++ evolution-exchange-2.9.91/camel/camel-stub.c	2007-02-12 14:17:08.000000000 -0500
-@@ -438,7 +438,7 @@
- 				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;
---- evolution-exchange-2.9.91/camel/camel-exchange-folder.c.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
-+++ evolution-exchange-2.9.91/camel/camel-exchange-folder.c	2007-02-12 14:17:08.000000000 -0500
-@@ -263,7 +263,8 @@
- 		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 @@
- 		return NULL;
+ 		g_free (delegator_uri);
  	}
+--- evolution-exchange-2.9.91/mail/mail-utils.c.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
++++ evolution-exchange-2.9.91/mail/mail-utils.c	2007-02-13 05:10:42.000000000 -0500
+@@ -207,11 +207,11 @@
+ 		ctend = strchr (ctstart, '\n');
  
--	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));
+ 		headers = g_strdup_printf ("%.*s\nContent-Type: text/plain; charset=\"UTF-8\"%.*s\n\n",
+-					   ctstart - hstart, hstart,
+-					   hend - ctend, ctend);
++					   (int) (ctstart - hstart), hstart,
++					   (int) (hend - ctend), ctend);
+ 	} else {
+ 		headers = g_strdup_printf ("%.*s\nContent-Type: text/plain; charset=\"UTF-8\"\n\n\n",
+-					   hend - hstart, hstart);
++					   (int) (hend - hstart), hstart);
+ 	}
  
---- evolution-exchange-2.9.91/camel/camel-exchange-journal.c.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
-+++ evolution-exchange-2.9.91/camel/camel-exchange-journal.c	2007-02-12 14:17:08.000000000 -0500
-@@ -122,7 +122,7 @@
- 	
- 	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) {
---- evolution-exchange-2.9.91/camel/camel-stub-marshal.c.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
-+++ evolution-exchange-2.9.91/camel/camel-stub-marshal.c	2007-02-12 14:17:08.000000000 -0500
-@@ -205,7 +205,7 @@
+ 	return headers;
+@@ -310,7 +310,7 @@
+  * 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 @@
+ 	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 @@
+ 	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);
+ 	}
+--- evolution-exchange-2.9.91/mail/mail-utils.h.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
++++ evolution-exchange-2.9.91/mail/mail-utils.h	2007-02-13 04:30:47.000000000 -0500
+@@ -20,7 +20,7 @@
  
- 	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);
- }
+ char *   mail_util_extract_transport_headers (E2kProperties *props);
  
- static int
-@@ -407,7 +407,7 @@
+-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);
+--- evolution-exchange-2.9.91/mail/mail-stub.c.fix-compiler-warnings	2007-01-08 10:51:41.000000000 -0500
++++ evolution-exchange-2.9.91/mail/mail-stub.c	2007-02-13 04:30:47.000000000 -0500
+@@ -202,7 +202,7 @@
+ 		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 @@
+ 			 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 @@
+ 		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 @@
+ 			int len = va_arg (ap, int);
+ 			GByteArray ba;
  
- 	*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 @@
- 	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;
+-			ba.data = data;
++			ba.data = (guint8 *) data;
+ 			ba.len = len;
+ 			camel_stub_marshal_encode_bytes (marshal, &ba);
+ 			break;




More information about the fedora-cvs-commits mailing list