[evolution-patches] Cleanups for warnings in camel



Hi.

This patch cleans up a bunch of warnings in camel. I'm not sure it's
ready for prime time though, so I'd welcome comments. A lot of these are
probably just band aids around real problems, but this is also a way to
pinpoint those I guess :-)

Cheers
Kjartan

? a.out
? camel-mime-tables.c
? warnings
Index: ChangeLog.pre-1-4
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/ChangeLog.pre-1-4,v
retrieving revision 1.1
diff -u -p -r1.1 ChangeLog.pre-1-4
--- ChangeLog.pre-1-4	9 Jun 2003 17:31:11 -0000	1.1
+++ ChangeLog.pre-1-4	15 Aug 2006 20:02:52 -0000
@@ -17407,7 +17407,7 @@
 	* providers/imap/camel-imap-folder.c (camel_imap_folder_new): 
 	Initialize the summary and subfolder listing.
 	(imap_summary_free): Now takes a GPtrArray arg rather than a 
-	CamelImapFolder as it increases it's usefullness for free()'ing
+	CamelImapFolder as it increases it's usefulness for free()'ing
 	temporary summaries.
 	(imap_get_message_count_internal): A new convenience function for
 	getting the actual message count on a server to be used by 
Index: camel-block-file.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-block-file.c,v
retrieving revision 1.22
diff -u -p -r1.22 camel-block-file.c
--- camel-block-file.c	12 Apr 2006 19:14:13 -0000	1.22
+++ camel-block-file.c	15 Aug 2006 20:02:52 -0000
@@ -529,7 +529,7 @@ int camel_block_file_free_block(CamelBlo
  * @bs: 
  * @id: 
  * 
- * Retreive a block @id.
+ * Retrieve a block @id.
  * 
  * Return value: The block, or NULL if blockid is invalid or a file error
  * occured.
Index: camel-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-folder.c,v
retrieving revision 1.215
diff -u -p -r1.215 camel-folder.c
--- camel-folder.c	15 Jun 2006 15:22:10 -0000	1.215
+++ camel-folder.c	15 Aug 2006 20:02:52 -0000
@@ -1648,14 +1648,14 @@ filter_filter(CamelSession *session, Cam
 		camel_operation_start (NULL, _("Learning junk"));
 
 		for (i = 0; i < m->junk->len; i ++) {
-			CamelMimeMessage *msg = camel_folder_get_message(m->folder, m->junk->pdata[i], NULL);
+			CamelMimeMessage *mime_msg = camel_folder_get_message(m->folder, m->junk->pdata[i], NULL);
 			int pc = 100 * i / m->junk->len;
 			
 			camel_operation_progress(NULL, pc);
 
-			if (msg) {
-				camel_junk_plugin_report_junk (csp, msg);
-				camel_object_unref (msg);
+			if (mime_msg) {
+				camel_junk_plugin_report_junk (csp, mime_msg);
+				camel_object_unref (mime_msg);
 			}
 		}
 		camel_operation_end (NULL);
@@ -1664,14 +1664,14 @@ filter_filter(CamelSession *session, Cam
 	if (m->notjunk) {
 		camel_operation_start (NULL, _("Learning non-junk"));
 		for (i = 0; i < m->notjunk->len; i ++) {
-			CamelMimeMessage *msg = camel_folder_get_message(m->folder, m->notjunk->pdata[i], NULL);
+			CamelMimeMessage *mime_msg = camel_folder_get_message(m->folder, m->notjunk->pdata[i], NULL);
 			int pc = 100 * i / m->notjunk->len;
 
 			camel_operation_progress(NULL, pc);
 
-			if (msg) {
-				camel_junk_plugin_report_notjunk (csp, msg);
-				camel_object_unref (msg);
+			if (mime_msg) {
+				camel_junk_plugin_report_notjunk (csp, mime_msg);
+				camel_object_unref (mime_msg);
 			}
 		}
 		camel_operation_end (NULL);
Index: camel-mime-filter-html.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-filter-html.c,v
retrieving revision 1.8
diff -u -p -r1.8 camel-mime-filter-html.c
--- camel-mime-filter-html.c	12 Apr 2006 19:14:13 -0000	1.8
+++ camel-mime-filter-html.c	15 Aug 2006 20:02:52 -0000
@@ -127,15 +127,15 @@ run(CamelMimeFilter *mf, char *in, size_
 	camel_html_parser_set_data (f->priv->ctxt, in, inlen, last);
 	do {
 		const char *data;
-		int len;
+		int length;
 		
-		state = camel_html_parser_step(f->priv->ctxt, &data, &len);
+		state = camel_html_parser_step(f->priv->ctxt, &data, &length);
 		
 		switch(state) {
 		case CAMEL_HTML_PARSER_DATA:
 		case CAMEL_HTML_PARSER_ENT:
-			memcpy(outp, data, len);
-			outp += len;
+			memcpy(outp, data, length);
+			outp += length;
 			break;
 		case CAMEL_HTML_PARSER_ELEMENT:
 			/* FIXME: do some whitespace processing here */
Index: camel-stream-vfs.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-stream-vfs.c,v
retrieving revision 1.1
diff -u -p -r1.1 camel-stream-vfs.c
--- camel-stream-vfs.c	24 May 2006 16:27:18 -0000	1.1
+++ camel-stream-vfs.c	15 Aug 2006 20:02:52 -0000
@@ -32,6 +32,7 @@
 #include <string.h>
 
 #include <glib/gstdio.h>
+#include <libgnomevfs/gnome-vfs.h>
 
 #include "camel-file-utils.h"
 #include "camel-operation.h"
@@ -83,8 +84,8 @@ camel_stream_vfs_finalize (CamelObject *
 {
 	CamelStreamVFS *stream_vfs = CAMEL_STREAM_VFS (object);
 
-	if (stream_vfs->handle != -1)
-		close (stream_vfs->handle);
+	if (stream_vfs->handle != (gpointer) -1)
+		close ((int)stream_vfs->handle);
 }
 
 
@@ -121,7 +122,6 @@ camel_stream_vfs_new_with_handle (GnomeV
 {
 	CamelStreamVFS *stream_vfs;
 	off_t offset;
-	GnomeVFSResult result;
 	
 	if (!handle)
 		return NULL;
@@ -151,7 +151,7 @@ camel_stream_vfs_new_with_uri (const cha
 {
 	GnomeVFSResult result;
 	GnomeVFSHandle *handle;
-	int vfs_flag;
+	int vfs_flag = 0;
 	
 	if (flags & O_WRONLY)
 		vfs_flag = vfs_flag | GNOME_VFS_OPEN_WRITE;
@@ -177,7 +177,7 @@ stream_read (CamelStream *stream, char *
 {
 	CamelStreamVFS *stream_vfs = CAMEL_STREAM_VFS (stream);
 	CamelSeekableStream *seekable = CAMEL_SEEKABLE_STREAM (stream);
-	ssize_t nread = 0;
+	GnomeVFSFileSize nread = 0;
 	GnomeVFSResult result;
 	
 	if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
@@ -198,7 +198,7 @@ stream_write (CamelStream *stream, const
 {
 	CamelStreamVFS *stream_vfs = CAMEL_STREAM_VFS (stream);
 	CamelSeekableStream *seekable = CAMEL_SEEKABLE_STREAM (stream);
-	ssize_t nwritten = 0;
+	GnomeVFSFileSize nwritten = 0;
 	GnomeVFSResult result;
 	
 	if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
@@ -236,7 +236,7 @@ static off_t
 stream_seek (CamelSeekableStream *stream, off_t offset, CamelStreamSeekPolicy policy)
 {
 	CamelStreamVFS *stream_vfs = CAMEL_STREAM_VFS (stream);
-	off_t real = 0;
+	GnomeVFSFileSize real = 0;
 	GnomeVFSResult result;
 	GnomeVFSHandle *handle = stream_vfs->handle;
 	
Index: camel-stream-vfs.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-stream-vfs.h,v
retrieving revision 1.1
diff -u -p -r1.1 camel-stream-vfs.h
--- camel-stream-vfs.h	25 May 2006 04:38:04 -0000	1.1
+++ camel-stream-vfs.h	15 Aug 2006 20:02:52 -0000
@@ -62,7 +62,8 @@ typedef struct {
 CamelType camel_stream_vfs_get_type (void);
 
 /* public methods */
-CamelStream * camel_stream_vfs_new_with_uri            (const char *uri, int flags, mode_t mode);
+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: camel-url.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-url.c,v
retrieving revision 1.45
diff -u -p -r1.45 camel-url.c
--- camel-url.c	15 Sep 2005 17:35:45 -0000	1.45
+++ camel-url.c	15 Aug 2006 20:02:52 -0000
@@ -58,7 +58,7 @@ camel_url_new_with_base (CamelURL *base,
 {
 	CamelURL *url;
 	const char *end, *hash, *colon, *semi, *at, *slash, *question;
-	const char *p;
+	const char *proto;
 
 	url = g_new0 (CamelURL, 1);
 
@@ -77,15 +77,15 @@ camel_url_new_with_base (CamelURL *base,
 		end = url_string + strlen (url_string);
 
 	/* Find protocol: initial [a-z+.-]* substring until ":" */
-	p = url_string;
-	while (p < end && (isalnum ((unsigned char)*p) ||
-			   *p == '.' || *p == '+' || *p == '-'))
-		p++;
+	proto = url_string;
+	while (proto < end && (isalnum ((unsigned char)*proto) ||
+			   *proto == '.' || *proto == '+' || *proto == '-'))
+		proto++;
 
-	if (p > url_string && *p == ':') {
-		url->protocol = g_strndup (url_string, p - url_string);
+	if (proto > url_string && *proto == ':') {
+		url->protocol = g_strndup (url_string, proto - url_string);
 		camel_strdown (url->protocol);
-		url_string = p + 1;
+		url_string = proto + 1;
 	}
 
 	if (!*url_string && !base)
Index: providers/groupwise/camel-groupwise-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-folder.c,v
retrieving revision 1.141
diff -u -p -r1.141 camel-groupwise-folder.c
--- providers/groupwise/camel-groupwise-folder.c	22 Jul 2006 08:42:33 -0000	1.141
+++ providers/groupwise/camel-groupwise-folder.c	15 Aug 2006 20:02:52 -0000
@@ -297,7 +297,7 @@ groupwise_msg_set_recipient_list (CamelM
 {
 	GSList *recipient_list;
 	EGwItemOrganizer *org;
-	struct _camel_header_address *ha;
+	struct _camel_header_address *ha = NULL;
 	char *subs_email;
 	struct _camel_header_address *to_list = NULL, *cc_list = NULL, *bcc_list=NULL;
 
@@ -1125,7 +1125,6 @@ gw_update_cache (CamelFolder *folder, GL
 	CamelGroupwiseFolder *gw_folder = CAMEL_GROUPWISE_FOLDER(folder);
 	CamelGroupwiseStorePrivate *priv = gw_store->priv;
 	EGwConnection *cnc = cnc_lookup (priv);
-	GSList *attach_list = NULL;
 	guint32 item_status, status_flags = 0;
 	CamelFolderChangeInfo *changes = NULL;
 	gboolean exists = FALSE;
@@ -1357,7 +1356,6 @@ gw_update_summary ( CamelFolder *folder,
 {
 	CamelGroupwiseMessageInfo *mi = NULL;
 	CamelGroupwiseStore *gw_store = CAMEL_GROUPWISE_STORE (folder->parent_store);
-	GSList *attach_list = NULL;
 	guint32 item_status, status_flags = 0;
 	CamelFolderChangeInfo *changes = NULL;
 	gboolean exists = FALSE;
@@ -1532,9 +1530,9 @@ groupwise_folder_item_to_msg( CamelFolde
 	const char *container_id = NULL;
 	GSList *attach_list = NULL;
 	EGwItemType type;
-	EGwConnectionStatus status;
+	EGwConnectionStatus status = 0;
 	EGwConnection *cnc;
-	CamelMultipart *multipart;
+	CamelMultipart *multipart = NULL;
 	int errno;
 	char *body = NULL;
 	int body_len = 0;
@@ -1866,7 +1864,7 @@ groupwise_append_message (CamelFolder *f
 	CamelGroupwiseStore *gw_store= CAMEL_GROUPWISE_STORE(folder->parent_store);
 	CamelGroupwiseStorePrivate  *priv = gw_store->priv;
 	CamelOfflineStore *offline = (CamelOfflineStore *) folder->parent_store;
-	EGwConnectionStatus status;
+	EGwConnectionStatus status = 0;
 	EGwConnection *cnc;
 	EGwItem *item;
 	char *id;
Index: providers/groupwise/camel-groupwise-provider.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-provider.c,v
retrieving revision 1.33
diff -u -p -r1.33 camel-groupwise-provider.c
--- providers/groupwise/camel-groupwise-provider.c	31 Aug 2005 04:26:07 -0000	1.33
+++ providers/groupwise/camel-groupwise-provider.c	15 Aug 2006 20:02:52 -0000
@@ -44,7 +44,7 @@ static gint check_equal (char *s1, char 
 static gint groupwise_url_equal (gconstpointer a, gconstpointer b);
 
 
-CamelProviderConfEntry groupwise_conf_entries[] = {
+static CamelProviderConfEntry groupwise_conf_entries[] = {
 	/* override the labels/defaults of the standard settings */
 
 	{ CAMEL_PROVIDER_CONF_SECTION_START, "mailcheck", NULL,
@@ -98,7 +98,7 @@ static CamelProvider groupwise_provider 
 	/* ... */
 };
 
-CamelServiceAuthType camel_groupwise_password_authtype = {
+static CamelServiceAuthType camel_groupwise_password_authtype = {
 	N_("Password"),
 	
 	N_("This option will connect to the GroupWise server using a "
Index: providers/groupwise/camel-groupwise-store-summary.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-store-summary.c,v
retrieving revision 1.6
diff -u -p -r1.6 camel-groupwise-store-summary.c
--- providers/groupwise/camel-groupwise-store-summary.c	14 Dec 2005 15:28:37 -0000	1.6
+++ providers/groupwise/camel-groupwise-store-summary.c	15 Aug 2006 20:02:52 -0000
@@ -257,7 +257,7 @@ camel_groupwise_store_summary_path_to_fu
 	if (si && strlen(subpath) == strlen(path)) {
 		f = g_strdup(camel_groupwise_store_info_full_name(s, si));
 		camel_store_summary_info_free((CamelStoreSummary *)s, si);
-		return f;
+		return (char *)f;
 	}
 
 	ns = camel_groupwise_store_summary_namespace_find_path(s, path);
@@ -306,7 +306,7 @@ camel_groupwise_store_summary_path_to_fu
 		g_free(f);
 		f = full;
 	}
-	return f ;
+	return (char *)f;
 }
 
 CamelGroupwiseStoreNamespace *
Index: providers/groupwise/camel-groupwise-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-store.c,v
retrieving revision 1.104
diff -u -p -r1.104 camel-groupwise-store.c
--- providers/groupwise/camel-groupwise-store.c	5 Jul 2006 10:15:09 -0000	1.104
+++ providers/groupwise/camel-groupwise-store.c	15 Aug 2006 20:02:53 -0000
@@ -329,6 +329,8 @@ groupwise_connect (CamelService *service
 	return FALSE;
 
 }
+
+#if 0
 static void
 groupwise_disconnect_cleanup (CamelService *service, gboolean clean, CamelException *ex)
 {
@@ -382,6 +384,7 @@ groupwise_disconnect_cleanup (CamelServi
 		groupwise_store->priv = NULL;
 	}
 }
+#endif
 
 static gboolean
 groupwise_disconnect (CamelService *service, gboolean clean, CamelException *ex)
@@ -479,10 +482,6 @@ groupwise_forget_folder (CamelGroupwiseS
 	char *summary_file, *state_file;
 	char *folder_dir, *storage_path;
 	CamelFolderInfo *fi;
-	const char *name;
-
-	
-	name = folder_name;
 
 	storage_path = g_strdup_printf ("%s/folders", priv->storage_path);
 	folder_dir = g_strdup(e_path_to_physical (storage_path,folder_name));
@@ -558,7 +557,7 @@ groupwise_get_folder (CamelStore *store,
 	const char *position = E_GW_CURSOR_POSITION_END; 
 	int count = 0, cursor, summary_count = 0;
 	CamelStoreInfo *si = NULL;
-	guint total;
+	guint total = 0;
 	
 	folder = groupwise_get_folder_from_disk (store, folder_name, flags, ex);
 	if (folder) {
@@ -695,7 +694,7 @@ gw_store_reload_folder (CamelGroupwiseSt
 	const char *position = E_GW_CURSOR_POSITION_END; 
 	int count = 0, cursor, summary_count = 0;
 	CamelStoreInfo *si = NULL;
-	guint total;
+	guint total = 0;
 	
 	camel_exception_clear (ex);
 
@@ -1071,6 +1070,7 @@ struct _store_refresh_msg {
 	CamelException ex;
 };
 
+#if 0
 static void
 store_refresh_refresh (CamelSession *session, CamelSessionThreadMsg *msg)
 {
@@ -1102,6 +1102,7 @@ static CamelSessionThreadOps store_refre
 	store_refresh_refresh,
 	store_refresh_free,
 };
+#endif
 
 /*** Thread stuff ends ***/
 
@@ -1111,19 +1112,20 @@ groupwise_get_folder_info (CamelStore *s
 	CamelGroupwiseStore *groupwise_store = CAMEL_GROUPWISE_STORE (store);
 	CamelGroupwiseStorePrivate *priv = groupwise_store->priv;
 	CamelFolderInfo *info = NULL;
+#if 0
 	char *top_folder = NULL;
 	
 	if (top) {
 		top_folder = g_hash_table_lookup (priv->name_hash, top);
 		/* 'top' is a valid path, but doesnt have a container id
 		 *  return NULL */
-/*		if (!top_folder) {
+		if (!top_folder) {
 			camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
 					_("You must be working online to complete this operation"));
 			return NULL;
-		}*/
+		}
 	}
-
+#endif
 	if (top && groupwise_is_system_folder (top)) 
 		return groupwise_build_folder_info (groupwise_store, NULL, top );
 
Index: providers/groupwise/camel-groupwise-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-utils.c,v
retrieving revision 1.35
diff -u -p -r1.35 camel-groupwise-utils.c
--- providers/groupwise/camel-groupwise-utils.c	17 Jul 2006 11:00:49 -0000	1.35
+++ providers/groupwise/camel-groupwise-utils.c	15 Aug 2006 20:02:53 -0000
@@ -431,8 +431,8 @@ camel_groupwise_util_item_from_message (
 		type = camel_mime_part_get_content_type((CamelMimePart *)message);
 		
 		if (camel_content_type_is (type, "text", "plain")) {
-			CamelStream *filtered_stream;
-			CamelMimeFilter *filter;
+			CamelStreamFilter *filtered_stream;
+			CamelMimeFilterCharset *filter;
 			const char *charset;
 			char *content_type;
 			
@@ -444,16 +444,16 @@ camel_groupwise_util_item_from_message (
 			if (charset && g_ascii_strcasecmp (charset, "US-ASCII") && g_ascii_strcasecmp (charset, "UTF-8")) {
 				filter = camel_mime_filter_charset_new_convert (charset, "UTF-8");
 				filtered_stream = camel_stream_filter_new_with_stream ((CamelStream *) content);
-				camel_stream_filter_add ((CamelStreamFilter *) filtered_stream, filter);
+				camel_stream_filter_add ((CamelStreamFilter *) filtered_stream, (CamelMimeFilter *)filter);
 				camel_object_unref (filter);
 			} else {
 				/* US-ASCII or UTF-8 */
-				filtered_stream = (CamelStream *) content;
+				filtered_stream = (CamelStreamFilter *) content;
 				camel_object_ref (content);
 			}
 			
-			camel_data_wrapper_decode_to_stream (dw, filtered_stream);
-			camel_stream_flush (filtered_stream);
+			camel_data_wrapper_decode_to_stream (dw, (CamelStream *)filtered_stream);
+			camel_stream_flush ((CamelStream *)filtered_stream);
 			camel_object_unref (filtered_stream);
 			
 			camel_stream_write ((CamelStream *) content, "", 1);
@@ -617,7 +617,6 @@ do_multipart (EGwConnection *cnc, EGwIte
 		CamelDataWrapper *dw = NULL;
 		const char *disposition, *filename;
 		const char *content_id = NULL;
-		gboolean is_alternative = FALSE;
 		/*
 		 * XXX:
 		 * Assuming the first part always is the actual message
@@ -641,7 +640,6 @@ do_multipart (EGwConnection *cnc, EGwIte
 			CamelDataWrapper *temp_dw = NULL;
 			
 			if (temp_part) {
-				is_alternative = TRUE;
 				temp_dw = camel_medium_get_content_object (CAMEL_MEDIUM (temp_part));
 				camel_data_wrapper_write_to_stream(temp_dw, (CamelStream *)temp_content);
 				filename = camel_mime_part_get_filename (temp_part);
@@ -654,8 +652,8 @@ do_multipart (EGwConnection *cnc, EGwIte
 		} 
 		
 		if (i == 0 && camel_content_type_is (type, "text", "plain")) {
-			CamelStream *filtered_stream;
-			CamelMimeFilter *filter;
+			CamelStreamFilter *filtered_stream;
+			CamelMimeFilterCharset *filter;
 			const char *charset;
 			char *content_type;
 			
@@ -667,16 +665,16 @@ do_multipart (EGwConnection *cnc, EGwIte
 			if (charset && g_ascii_strcasecmp (charset, "US-ASCII") && g_ascii_strcasecmp (charset, "UTF-8")) {
 				filter = camel_mime_filter_charset_new_convert (charset, "UTF-8");
 				filtered_stream = camel_stream_filter_new_with_stream ((CamelStream *) content);
-				camel_stream_filter_add ((CamelStreamFilter *) filtered_stream, filter);
+				camel_stream_filter_add ((CamelStreamFilter *) filtered_stream, (CamelMimeFilter *)filter);
 				camel_object_unref (filter);
 			} else {
 				/* US-ASCII or UTF-8 */
-				filtered_stream = (CamelStream *) content;
+				filtered_stream = (CamelStreamFilter *) content;
 				camel_object_ref (content);
 			}
 			
-			camel_data_wrapper_decode_to_stream (dw, filtered_stream);
-			camel_stream_flush (filtered_stream);
+			camel_data_wrapper_decode_to_stream (dw, (CamelStream *)filtered_stream);
+			camel_stream_flush ((CamelStream *)filtered_stream);
 			camel_object_unref (filtered_stream);
 			
 			camel_stream_write ((CamelStream *) content, "", 1);
Index: providers/imap/camel-imap-store-summary.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/imap/camel-imap-store-summary.c,v
retrieving revision 1.18
diff -u -p -r1.18 camel-imap-store-summary.c
--- providers/imap/camel-imap-store-summary.c	12 Apr 2006 19:14:14 -0000	1.18
+++ providers/imap/camel-imap-store-summary.c	15 Aug 2006 20:02:53 -0000
@@ -235,7 +235,7 @@ camel_imap_store_summary_path_to_full(Ca
 	if (si && strlen(subpath) == strlen(path)) {
 		f = g_strdup(camel_imap_store_info_full_name(s, si));
 		camel_store_summary_info_free((CamelStoreSummary *)s, si);
-		return f;
+		return (char *)f;
 	}
 
 	ns = camel_imap_store_summary_namespace_find_path(s, path);
@@ -256,7 +256,7 @@ camel_imap_store_summary_path_to_full(Ca
 			else {
 				if (c == '/')
 					c = dir_sep;
-				camel_utf8_putc(&f, c);
+				camel_utf8_putc((unsigned char **)&f, c);
 			}
 			break;
 		case 1:
@@ -266,11 +266,11 @@ camel_imap_store_summary_path_to_full(Ca
 		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 = g_strdup(full);
Index: providers/imap4/camel-imap4-folder.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/imap4/camel-imap4-folder.c,v
retrieving revision 1.50
diff -u -p -r1.50 camel-imap4-folder.c
--- providers/imap4/camel-imap4-folder.c	15 Jun 2006 16:41:58 -0000	1.50
+++ providers/imap4/camel-imap4-folder.c	15 Aug 2006 20:02:53 -0000
@@ -1016,8 +1016,6 @@ imap4_append_message (CamelFolder *folde
 				strcpy (parent_name, folder->full_name);
 				if (!(p = strrchr (parent_name, '/')))
 					*parent_name = '\0';
-				else
-					*p = '\0';
 				
 				if (!(fi = camel_store_create_folder (folder->parent_store, parent_name, folder->name, &lex))) {
 					camel_exception_clear (&lex);
Index: providers/imap4/camel-imap4-store-summary.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/imap4/camel-imap4-store-summary.c,v
retrieving revision 1.8
diff -u -p -r1.8 camel-imap4-store-summary.c
--- providers/imap4/camel-imap4-store-summary.c	12 Apr 2006 19:14:14 -0000	1.8
+++ providers/imap4/camel-imap4-store-summary.c	15 Aug 2006 20:02:53 -0000
@@ -171,7 +171,8 @@ static int
 summary_header_load (CamelStoreSummary *s, FILE *in)
 {
 	CamelIMAP4StoreSummary *is = (CamelIMAP4StoreSummary *) s;
-	guint32 version, capa;
+	guint32 capa;
+	int version;
 	
 	if (parent_class->summary_header_load (s, in) == -1)
 		return -1;
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 -p -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	15 Aug 2006 20:02:53 -0000
@@ -274,7 +274,7 @@ camel_nntp_store_summary_path_to_full (C
 		f = full;
 	}
 	
-	return f;
+	return (char *)f;
 }
 
 CamelNNTPStoreInfo *
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 -p -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	15 Aug 2006 20:02:53 -0000
@@ -343,8 +343,6 @@ camel_nntp_stream_line(CamelNNTPStream *
 		oe = is->lineend - 1;
 		o = is->linebuf + oldlen;
 	}
-
-	return -1;
 }
 
 /* returns -1 on error, 0 if last lot of data, >0 if more remaining */
Index: providers/pop3/camel-pop3-engine.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/pop3/camel-pop3-engine.c,v
retrieving revision 1.13
diff -u -p -r1.13 camel-pop3-engine.c
--- providers/pop3/camel-pop3-engine.c	9 Jun 2006 01:21:54 -0000	1.13
+++ providers/pop3/camel-pop3-engine.c	15 Aug 2006 20:02:53 -0000
@@ -104,11 +104,11 @@ read_greeting (CamelPOP3Engine *pe)
 {
 	extern CamelServiceAuthType camel_pop3_password_authtype;
 	extern CamelServiceAuthType camel_pop3_apop_authtype;
-	unsigned char *line, *apop, *apopend;
+	char *line, *apop, *apopend;
 	unsigned int len;
 	
 	/* first, read the greeting */
-	if (camel_pop3_stream_line (pe->stream, &line, &len) == -1
+	if (camel_pop3_stream_line (pe->stream, (unsigned char **)&line, &len) == -1
 	    || strncmp (line, "+OK", 3) != 0)
 		return -1;
 	
@@ -188,7 +188,7 @@ static struct {
 static void
 cmd_capa(CamelPOP3Engine *pe, CamelPOP3Stream *stream, void *data)
 {
-	unsigned char *line, *tok, *next;
+	char *line, *tok, *next;
 	unsigned int len;
 	int ret;
 	int i;
@@ -197,7 +197,7 @@ cmd_capa(CamelPOP3Engine *pe, CamelPOP3S
 	dd(printf("cmd_capa\n"));
 
 	do {
-		ret = camel_pop3_stream_line(stream, &line, &len);
+		ret = camel_pop3_stream_line(stream, (unsigned char **)&line, &len);
 		if (ret >= 0) {
 			if (strncmp(line, "SASL ", 5) == 0) {
 				tok = line+5;
Index: providers/pop3/camel-pop3-provider.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/pop3/camel-pop3-provider.c,v
retrieving revision 1.37
diff -u -p -r1.37 camel-pop3-provider.c
--- providers/pop3/camel-pop3-provider.c	14 Jul 2006 05:09:02 -0000	1.37
+++ providers/pop3/camel-pop3-provider.c	15 Aug 2006 20:02:53 -0000
@@ -77,7 +77,7 @@ CamelServiceAuthType camel_pop3_password
 	TRUE
 };
 
-CamelServiceAuthType camel_pop3_apop_authtype = {
+static CamelServiceAuthType camel_pop3_apop_authtype = {
 	"APOP",
 
 	N_("This option will connect to the POP server using an encrypted "
Index: providers/pop3/camel-pop3-stream.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/pop3/camel-pop3-stream.c,v
retrieving revision 1.5
diff -u -p -r1.5 camel-pop3-stream.c
--- providers/pop3/camel-pop3-stream.c	31 Aug 2005 04:26:04 -0000	1.5
+++ providers/pop3/camel-pop3-stream.c	15 Aug 2006 20:02:53 -0000
@@ -346,8 +346,6 @@ camel_pop3_stream_line(CamelPOP3Stream *
 		oe = is->lineend - 1;
 		o = is->linebuf + oldlen;
 	}
-
-	return -1;
 }
 
 /* returns -1 on error, 0 if last lot of data, >0 if more remaining */


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