[evolution-data-server] Get rid of rest of the warnings.



commit e642f140504548728eecdb587ecff989051863cd
Author: Chenthill Palanisamy <pchenthill novell com>
Date:   Wed Dec 2 20:24:49 2009 +0530

    Get rid of rest of the warnings.

 camel/providers/imapx/camel-imapx-server.c        |    3 +-
 camel/providers/imapx/camel-imapx-store-summary.c |    3 +-
 camel/providers/imapx/camel-imapx-store.c         |   52 ++-------------------
 camel/providers/imapx/camel-imapx-tokenise.h      |   16 +++---
 camel/providers/imapx/camel-imapx-tokens.txt      |    2 +-
 camel/providers/imapx/camel-imapx-utils.h         |    2 +-
 6 files changed, 19 insertions(+), 59 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index accb189..38f250d 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -415,6 +415,7 @@ imapx_command_addv(CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
 	CamelDataWrapper *D;
 	CamelSasl *A;
 	gchar buffer[16];
+	CamelException ex = {0, NULL};
 
 	c(printf("adding command, fmt = '%s'\n", fmt));
 
@@ -523,7 +524,7 @@ imapx_command_addv(CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
 				case 'F': /* IMAP flags set */
 					f = va_arg(ap, guint32);
 					F = va_arg(ap, CamelFlag *);
-					imap_write_flags((CamelStream *)ic->mem, f, F);
+					imap_write_flags((CamelStream *)ic->mem, f, F, &ex);
 					break;
 				case 'c':
 					d = va_arg(ap, gint);
diff --git a/camel/providers/imapx/camel-imapx-store-summary.c b/camel/providers/imapx/camel-imapx-store-summary.c
index 1d490b7..15e94fb 100644
--- a/camel/providers/imapx/camel-imapx-store-summary.c
+++ b/camel/providers/imapx/camel-imapx-store-summary.c
@@ -447,7 +447,8 @@ namespace_load(CamelStoreSummary *s, FILE *in)
 {
 	CamelIMAPXStoreNamespace *ns, *tail;
 	CamelIMAPXNamespaceList *nsl;
-	guint32 i, j, n;
+	guint32 i, j;
+	gint32 n;
 
 	nsl = g_malloc0(sizeof(CamelIMAPXNamespaceList));
 	nsl->personal = NULL;
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index c75f5e3..e9c478e 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -270,6 +270,7 @@ imap_get_inbox(CamelStore *store, CamelException *ex)
 	return NULL;
 }
 
+#if 0
 static CamelFolderInfo *
 folders_build_info(CamelURL *base, struct _list_info *li)
 {
@@ -379,44 +380,7 @@ folders_build_rec(CamelURL *base, GPtrArray *folders, gint *ip, CamelFolderInfo
 
 	return first;
 }
-
-static void
-folder_info_dump(CamelFolderInfo *fi, gint depth)
-{
-	gchar *s;
-
-	s = alloca(depth+1);
-	memset(s, ' ', depth);
-	s[depth] = 0;
-	while (fi) {
-		printf("%s%s (%s)\n", s, fi->name, fi->uri);
-		if (fi->child)
-			folder_info_dump(fi->child, depth+2);
-		fi = fi->next;
-	}
-
-}
-
-// THIS IS VERY CRAP AND VERY TEMPORARY
-// we re-lookup the table, after we just looked it up
-// in the first place to create the list, to get the counts.
-static void
-folder_info_fill(CamelStore *store, CamelFolderInfo *fi)
-{
-//	CamelView *view;
-
-	while (fi) {
-/*		view = camel_view_summary_get(store->view_summary, fi->full_name);
-		if (view) {
-			fi->total = view->total_count;
-			fi->unread = view->unread_count;
-			camel_view_unref(view); */
-//		}
-		if (fi->child)
-			folder_info_fill(store, fi->child);
-		fi = fi->next;
-	}
-}
+#endif
 
 /* folder_name is path name */
 static CamelFolderInfo *
@@ -787,8 +751,6 @@ fetch_folders_for_namespaces (CamelIMAPXStore *istore, const gchar *pattern, Cam
 static void
 sync_folders (CamelIMAPXStore *istore, const gchar *pattern, CamelException *ex)
 {
-	struct _list_info *li = NULL;
-	guint32 flags = 0;
 	GHashTable *folders_from_server;
 	gint i, total;
 
@@ -848,11 +810,7 @@ imapx_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, CamelE
 {
 	CamelIMAPXStore *istore = (CamelIMAPXStore *)store;
 	CamelFolderInfo * fi= NULL;
-	GPtrArray *folders = NULL;
-	CamelURL *base;
-	CamelIterator *iter;
-	gint i;
-
+	
 	if (top == NULL)
 		top = "";
 
@@ -865,9 +823,9 @@ imapx_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, CamelE
 	if (camel_exception_is_set(ex))
 		return NULL;
 
-	if (camel_store_summary_count (istore->summary) == 0) {
+	if (camel_store_summary_count ((CamelStoreSummary *) istore->summary) == 0) {
 		sync_folders (istore, top, ex);
-		camel_store_summary_save((CamelStoreSummary *)istore->summary);
+		camel_store_summary_save((CamelStoreSummary *) istore->summary);
 	}
 
 	fi = get_folder_info_offline (store, top, flags, ex);
diff --git a/camel/providers/imapx/camel-imapx-tokenise.h b/camel/providers/imapx/camel-imapx-tokenise.h
index 4975ef8..21475d8 100644
--- a/camel/providers/imapx/camel-imapx-tokenise.h
+++ b/camel/providers/imapx/camel-imapx-tokenise.h
@@ -29,7 +29,7 @@
 #endif
 
 #line 3 "camel-imapx-tokens.txt"
-struct _imap_keyword { gchar *name; camel_imapx_id_t id; };
+struct _imap_keyword {const gchar *name; camel_imapx_id_t id; };
 
 #define TOTAL_KEYWORDS 32
 #define MIN_WORD_LENGTH 2
@@ -45,10 +45,10 @@ __inline
 inline
 #endif
 #endif
-static guint
-imap_hash (register const gchar *str, register guint len)
+static unsigned int
+imap_hash (register const char *str, register unsigned int len)
 {
-  static guchar asso_values[] =
+  static unsigned char asso_values[] =
     {
       50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
       50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
@@ -77,14 +77,14 @@ imap_hash (register const gchar *str, register guint len)
       50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
       50, 50, 50, 50, 50, 50
     };
-  return len + asso_values[(guchar)str[len - 1]] + asso_values[(guchar)str[0]];
+  return len + asso_values[(unsigned char)str[len - 1]] + asso_values[(unsigned char)str[0]];
 }
 
 #ifdef __GNUC__
 __inline
 #endif
 struct _imap_keyword *
-imap_tokenise_struct (register const gchar *str, register guint len)
+imap_tokenise_struct (register const char *str, register unsigned int len)
 {
   static struct _imap_keyword wordlist[] =
     {
@@ -165,11 +165,11 @@ imap_tokenise_struct (register const gchar *str, register guint len)
 
   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
     {
-      register gint key = imap_hash (str, len);
+      register int key = imap_hash (str, len);
 
       if (key <= MAX_HASH_VALUE && key >= 0)
         {
-          register const gchar *s = wordlist[key].name;
+          register const char *s = wordlist[key].name;
 
           if (*str == *s && !strcmp (str + 1, s + 1))
             return &wordlist[key];
diff --git a/camel/providers/imapx/camel-imapx-tokens.txt b/camel/providers/imapx/camel-imapx-tokens.txt
index 0b10bd4..096f155 100644
--- a/camel/providers/imapx/camel-imapx-tokens.txt
+++ b/camel/providers/imapx/camel-imapx-tokens.txt
@@ -1,6 +1,6 @@
 /* This contains all of the keywords we care about.  These
    can be converted to an id very efficiently */
-struct _imap_keyword { char *name; camel_imapx_id_t id; };
+struct _imap_keyword {const gchar *name; camel_imapx_id_t id; };
 %%
 ALERT,          IMAP_ALERT
 APPENDUID,	IMAP_APPENDUID
diff --git a/camel/providers/imapx/camel-imapx-utils.h b/camel/providers/imapx/camel-imapx-utils.h
index fc7c633..8792f08 100644
--- a/camel/providers/imapx/camel-imapx-utils.h
+++ b/camel/providers/imapx/camel-imapx-utils.h
@@ -58,7 +58,7 @@ enum {
 /* ********************************************************************** */
 
 void imap_parse_flags(struct _CamelIMAPXStream *stream, guint32 *flagsp, struct _CamelFlag **user_flagsp, CamelException *ex);
-void imap_write_flags(CamelStream *stream, guint32 flags, struct _CamelFlag *user_flags);
+void imap_write_flags(CamelStream *stream, guint32 flags, struct _CamelFlag *user_flags, CamelException *ex);
 
 /* ********************************************************************** */
 enum {



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