[evolution-patches] Sparse warning cleanups for e-d-s



Patch attached.

- rename variables shadowing others
- uninitialized vars
- missing declarations
- static markers
- remove some unused bits
- const correctness
- mixing enums
- if vs ifdef
- add comments for some issues that should be discussed

Cheers
Kjartan

Index: camel/providers/groupwise/camel-groupwise-folder.c
===================================================================
--- camel/providers/groupwise/camel-groupwise-folder.c	(revisjon 7713)
+++ camel/providers/groupwise/camel-groupwise-folder.c	(arbeidskopi)
@@ -194,7 +194,6 @@
 
 	CAMEL_GROUPWISE_FOLDER_REC_UNLOCK (folder, cache_lock);
 
-end:
 	camel_message_info_free (&mi->info);
 	g_free (container_id);
 	return msg;
@@ -295,7 +294,7 @@
 {
 	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;
 
@@ -1604,7 +1603,7 @@
 	EGwItemType type;
 	EGwConnectionStatus status;
 	EGwConnection *cnc;
-	CamelMultipart *multipart;
+	CamelMultipart *multipart = NULL;
 	int errno;
 	char *body = NULL;
 	int body_len = 0;
@@ -1940,7 +1939,7 @@
 	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: camel/providers/groupwise/camel-groupwise-store.c
===================================================================
--- camel/providers/groupwise/camel-groupwise-store.c	(revisjon 7713)
+++ camel/providers/groupwise/camel-groupwise-store.c	(arbeidskopi)
@@ -559,7 +559,7 @@
 	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) {
@@ -696,7 +696,7 @@
 	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);
 
Index: camel/camel-stream-vfs.c
===================================================================
--- camel/camel-stream-vfs.c	(revisjon 7713)
+++ camel/camel-stream-vfs.c	(arbeidskopi)
@@ -83,6 +83,7 @@
 {
 	CamelStreamVFS *stream_vfs = CAMEL_STREAM_VFS (object);
 
+	/* Is this going to work? The handle is a struct */
 	if (stream_vfs->handle != -1)
 		gnome_vfs_close (stream_vfs->handle);
 }
@@ -150,7 +151,7 @@
 {
 	GnomeVFSResult result;
 	GnomeVFSHandle *handle;
-	int vfs_flag;
+	int vfs_flag = 0;
 	
 	if (flags & O_WRONLY)
 		vfs_flag = vfs_flag | GNOME_VFS_OPEN_WRITE;
Index: camel/camel-stream-vfs.h
===================================================================
--- camel/camel-stream-vfs.h	(revisjon 7713)
+++ camel/camel-stream-vfs.h	(arbeidskopi)
@@ -63,6 +63,7 @@
 
 /* public methods */
 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: docs/reference/addressbook/libebook/tmpl/e-book-query.sgml
===================================================================
--- docs/reference/addressbook/libebook/tmpl/e-book-query.sgml	(revisjon 7713)
+++ docs/reference/addressbook/libebook/tmpl/e-book-query.sgml	(arbeidskopi)
@@ -138,15 +138,6 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION e_book_query_vcard_field_exists ##### -->
-<para>
-
-</para>
-
- field: 
- Returns: 
-
-
 <!-- ##### FUNCTION e_book_query_field_test ##### -->
 <para>
 
Index: docs/reference/addressbook/libebook/tmpl/e-vcard.sgml
===================================================================
--- docs/reference/addressbook/libebook/tmpl/e-vcard.sgml	(revisjon 7713)
+++ docs/reference/addressbook/libebook/tmpl/e-vcard.sgml	(arbeidskopi)
@@ -181,15 +181,6 @@
 @Varargs: 
 
 
-<!-- ##### FUNCTION e_vcard_attribute_remove_value ##### -->
-<para>
-
-</para>
-
- attr: 
- s: 
-
-
 <!-- ##### FUNCTION e_vcard_attribute_remove_values ##### -->
 <para>
 
@@ -225,16 +216,6 @@
 @s: 
 
 
-<!-- ##### FUNCTION e_vcard_attribute_remove_param_value ##### -->
-<para>
-
-</para>
-
- attr: 
- param_name: 
- s: 
-
-
 <!-- ##### FUNCTION e_vcard_attribute_param_new ##### -->
 <para>
 
@@ -316,16 +297,6 @@
 @param: 
 
 
-<!-- ##### FUNCTION e_vcard_attribute_get_param ##### -->
-<para>
-
-</para>
-
- attr: 
- name: 
- Returns: 
-
-
 <!-- ##### FUNCTION e_vcard_attribute_param_get_name ##### -->
 <para>
 
@@ -788,13 +759,6 @@
 
 
 
-<!-- ##### MACRO EVC_X_GADUGADU ##### -->
-<para>
-
-</para>
-
-
-
 <!-- ##### MACRO EVC_X_BOOK_URI ##### -->
 <para>
 
Index: docs/reference/addressbook/libebook/tmpl/libebook-unused.sgml
===================================================================
--- docs/reference/addressbook/libebook/tmpl/libebook-unused.sgml	(revisjon 7713)
+++ docs/reference/addressbook/libebook/tmpl/libebook-unused.sgml	(arbeidskopi)
@@ -125,6 +125,14 @@
 </para>
 
 
+<!-- ##### ENUM EContactPhotoType ##### -->
+<para>
+
+</para>
+
+ E_CONTACT_PHOTO_TYPE_INLINED: 
+ E_CONTACT_PHOTO_TYPE_URI: 
+
 <!-- ##### STRUCT EContactPrivate ##### -->
 <para>
 
Index: docs/reference/addressbook/libebook/tmpl/e-contact.sgml
===================================================================
--- docs/reference/addressbook/libebook/tmpl/e-contact.sgml	(revisjon 7713)
+++ docs/reference/addressbook/libebook/tmpl/e-contact.sgml	(arbeidskopi)
@@ -747,14 +747,6 @@
 @prefixes: 
 @suffixes: 
 
-<!-- ##### ENUM EContactPhotoType ##### -->
-<para>
-
-</para>
-
- E_CONTACT_PHOTO_TYPE_INLINED: 
- E_CONTACT_PHOTO_TYPE_URI: 
-
 <!-- ##### STRUCT EContactPhoto ##### -->
 <para>
 
Index: docs/reference/addressbook/libedata-book/tmpl/libedata-book-unused.sgml
===================================================================
--- docs/reference/addressbook/libedata-book/tmpl/libedata-book-unused.sgml	(revisjon 7713)
+++ docs/reference/addressbook/libedata-book/tmpl/libedata-book-unused.sgml	(arbeidskopi)
@@ -134,3 +134,27 @@
 </para>
 
 
+<!-- ##### MACRO e_data_book_marshal_NONE__NONE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO e_data_book_marshal_NONE__POINTER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO e_data_book_marshal_VOID__POINTER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO e_data_book_marshal_VOID__VOID ##### -->
+<para>
+
+</para>
+
+
Index: docs/reference/addressbook/libedata-book/tmpl/e-data-book-marshal.sgml
===================================================================
--- docs/reference/addressbook/libedata-book/tmpl/e-data-book-marshal.sgml	(revisjon 7713)
+++ docs/reference/addressbook/libedata-book/tmpl/e-data-book-marshal.sgml	(arbeidskopi)
@@ -17,31 +17,3 @@
 <!-- ##### SECTION Stability_Level ##### -->
 
 
-<!-- ##### MACRO e_data_book_marshal_VOID__VOID ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO e_data_book_marshal_NONE__NONE ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO e_data_book_marshal_VOID__POINTER ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO e_data_book_marshal_NONE__POINTER ##### -->
-<para>
-
-</para>
-
-
-
Index: docs/reference/calendar/libecal/tmpl/e-cal-util.sgml
===================================================================
--- docs/reference/calendar/libecal/tmpl/e-cal-util.sgml	(revisjon 7713)
+++ docs/reference/calendar/libecal/tmpl/e-cal-util.sgml	(arbeidskopi)
@@ -136,16 +136,6 @@
 @Returns: 
 
 
-<!-- ##### FUNCTION e_cal_util_resolve_tzid ##### -->
-<para>
-
-</para>
-
- tzid: 
- data: 
- Returns: 
-
-
 <!-- ##### FUNCTION e_cal_util_priority_to_string ##### -->
 <para>
 
Index: docs/reference/calendar/libecal/tmpl/libecal-unused.sgml
===================================================================
--- docs/reference/calendar/libecal/tmpl/libecal-unused.sgml	(revisjon 7713)
+++ docs/reference/calendar/libecal/tmpl/libecal-unused.sgml	(arbeidskopi)
@@ -165,6 +165,15 @@
 @tasks: 
 @Returns: 
 
+<!-- ##### FUNCTION e_cal_util_resolve_tzid ##### -->
+<para>
+
+</para>
+
+ tzid: 
+ data: 
+ Returns: 
+
 <!-- ##### FUNCTION e_cal_view_get_client ##### -->
 <para>
 
Index: docs/reference/libedataserverui/tmpl/libedataserverui-unused.sgml
===================================================================
--- docs/reference/libedataserverui/tmpl/libedataserverui-unused.sgml	(revisjon 7713)
+++ docs/reference/libedataserverui/tmpl/libedataserverui-unused.sgml	(arbeidskopi)
@@ -22,3 +22,27 @@
 </para>
 
 
+<!-- ##### MACRO e_data_server_ui_marshal_NONE__NONE ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO e_data_server_ui_marshal_NONE__POINTER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO e_data_server_ui_marshal_VOID__POINTER ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO e_data_server_ui_marshal_VOID__VOID ##### -->
+<para>
+
+</para>
+
+
Index: docs/reference/libedataserverui/tmpl/e-data-server-ui-marshal.sgml
===================================================================
--- docs/reference/libedataserverui/tmpl/e-data-server-ui-marshal.sgml	(revisjon 7713)
+++ docs/reference/libedataserverui/tmpl/e-data-server-ui-marshal.sgml	(arbeidskopi)
@@ -17,34 +17,6 @@
 <!-- ##### SECTION Stability_Level ##### -->
 
 
-<!-- ##### MACRO e_data_server_ui_marshal_VOID__VOID ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO e_data_server_ui_marshal_NONE__NONE ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO e_data_server_ui_marshal_VOID__POINTER ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO e_data_server_ui_marshal_NONE__POINTER ##### -->
-<para>
-
-</para>
-
-
-
 <!-- ##### FUNCTION e_data_server_ui_marshal_BOOLEAN__OBJECT_BOXED ##### -->
 <para>
 
Index: servers/exchange/storage/e-folder-exchange.c
===================================================================
--- servers/exchange/storage/e-folder-exchange.c	(revisjon 7713)
+++ servers/exchange/storage/e-folder-exchange.c	(arbeidskopi)
@@ -476,7 +476,7 @@
 	xmlNode *root;
 	const char *name, *type, *outlook_class;
 	const char *physical_uri, *internal_uri, *permanent_uri;
-	const char *folder_size;
+	char *folder_size;
 	long long int fsize;
 	int status;
 
Index: servers/exchange/lib/e2k-security-descriptor.c
===================================================================
--- servers/exchange/lib/e2k-security-descriptor.c	(revisjon 7713)
+++ servers/exchange/lib/e2k-security-descriptor.c	(arbeidskopi)
@@ -838,7 +838,7 @@
 }
 
 
-struct {
+static struct {
 	const char *name;
 	guint32 perms;
 } roles[E2K_PERMISSIONS_ROLE_NUM_ROLES] = {
Index: servers/exchange/lib/e2k-utils.c
===================================================================
--- servers/exchange/lib/e2k-utils.c	(revisjon 7713)
+++ servers/exchange/lib/e2k-utils.c	(arbeidskopi)
@@ -33,7 +33,7 @@
 #include <string.h>
 
 /* Do not internationalize */
-const char *e2k_rfc822_months [] = {
+static const char *e2k_rfc822_months [] = {
 	"Jan", "Feb", "Mar", "Apr", "May", "Jun",
 	"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
 };
Index: servers/exchange/lib/e2k-rule-xml.c
===================================================================
--- servers/exchange/lib/e2k-rule-xml.c	(revisjon 7713)
+++ servers/exchange/lib/e2k-rule-xml.c	(arbeidskopi)
@@ -66,7 +66,6 @@
 }
 
 static const char *is_types[] = { NULL, NULL, NULL, NULL, "is", "is not" };
-static const char *include_types[] = { NULL, NULL, NULL, NULL, "include", "not include" };
 static const char *date_types[] = { "before", "before", "after", "after", NULL, NULL };
 static const char *size_types[] = { "less than", "less than", "greater than", "greater than", NULL, NULL };
 
Index: servers/exchange/lib/e2k-rule.h
===================================================================
--- servers/exchange/lib/e2k-rule.h	(revisjon 7713)
+++ servers/exchange/lib/e2k-rule.h	(arbeidskopi)
@@ -168,7 +168,7 @@
 		} reply;
 
 		GByteArray   *defer_data;
-		gint32        bounce_code;
+		guint32       bounce_code;
 		E2kAddrList  *addr_list;
 		E2kPropValue  proptag;
 	} act;
Index: servers/groupwise/e-gw-item.c
===================================================================
--- servers/groupwise/e-gw-item.c	(revisjon 7713)
+++ servers/groupwise/e-gw-item.c	(arbeidskopi)
@@ -710,7 +710,7 @@
                 item->priv->recipient_list = g_slist_append (item->priv->recipient_list, recipient);
         }        
 }
-static EGwTrackInfo
+static EGwItemReturnNotify
 get_notification_value (SoupSoapParameter *param, const char *param_name)
 {
 	SoupSoapParameter *subparam;
@@ -767,11 +767,11 @@
 		value = soup_soap_parameter_get_string_value (subparam);
 	       if (value) {
 		       if (!g_ascii_strcasecmp (value, "Delivered")) 
-			       priv->track_info = E_GW_DELIVERED;
+			       priv->track_info = E_GW_ITEM_DELIVERED;
 		       else if (!g_ascii_strcasecmp (value, "DeliveredAndOpened")) 
-				priv->track_info = E_GW_DELIVERED_OPENED;
+				priv->track_info = E_GW_ITEM_DELIVERED_OPENED;
 		       else if (!g_ascii_strcasecmp (value, "All")) 
-				priv->track_info = E_GW_ALL;
+				priv->track_info = E_GW_ITEM_ALL;
 		       
 		       g_free (value), value = NULL;
 
@@ -1703,7 +1703,7 @@
 			child != NULL;
 			child = soup_soap_parameter_get_next_child (child)) {
 		const char *name;
-		char *value;
+		char *value = NULL;
 
 		name = soup_soap_parameter_get_name (child);
 
@@ -1813,7 +1813,6 @@
 
 		} else if (!g_ascii_strcasecmp (name, "options")) {
 			SoupSoapParameter *subparam;
-			char *value = NULL;
 
 			subparam = soup_soap_parameter_get_first_child_by_name (child, "priority");
 			if (subparam) {
@@ -1959,7 +1958,6 @@
 		} else if (!g_ascii_strcasecmp (name, "subject"))
 			item->priv->subject = soup_soap_parameter_get_string_value (child);
 		else if (!g_ascii_strcasecmp (name, "source")) {
-			char *value;
 			value = soup_soap_parameter_get_string_value (child);
 			if (!strcmp (value, "personal")) {
 				if (item->priv->item_type == E_GW_ITEM_TYPE_TASK || 
@@ -1989,7 +1987,6 @@
 			char *enabled;
 			enabled = soup_soap_parameter_get_property (child, "enabled");
 			if (!g_ascii_strcasecmp (enabled, "1") ) {
-				char *value;
 				value = soup_soap_parameter_get_string_value (child);
 				/* convert it into integer */
 				item->priv->trigger = atoi (value);
Index: libedataserverui/e-tree-model-generator.c
===================================================================
--- libedataserverui/e-tree-model-generator.c	(revisjon 7713)
+++ libedataserverui/e-tree-model-generator.c	(arbeidskopi)
@@ -50,7 +50,7 @@
 static void         e_tree_model_generator_class_init      (ETreeModelGeneratorClass *class);
 static void         e_tree_model_generator_tree_model_init (GtkTreeModelIface  *iface);
 static void         e_tree_model_generator_finalize        (GObject            *object);
-static guint        e_tree_model_generator_get_flags       (GtkTreeModel       *tree_model);
+static GtkTreeModelFlags e_tree_model_generator_get_flags       (GtkTreeModel       *tree_model);
 static gint         e_tree_model_generator_get_n_columns   (GtkTreeModel       *tree_model);
 static GType        e_tree_model_generator_get_column_type (GtkTreeModel       *tree_model,
 							    gint                index);
@@ -523,11 +523,11 @@
 
 		/* Update parent pointers */
 		for (i = index + 1; i < group->len; i++) {
-			Node   *node = &g_array_index (group, Node, i);
+			Node   *pnode = &g_array_index (group, Node, i);
 			GArray *child_group;
 			gint    j;
 
-			child_group = node->child_nodes;
+			child_group = pnode->child_nodes;
 			if (!child_group)
 				continue;
 
@@ -607,11 +607,11 @@
 
 	/* Update parent pointers */
 	for (i = index; i < group->len; i++) {
-		Node   *node = &g_array_index (group, Node, i);
+		Node   *pnode = &g_array_index (group, Node, i);
 		GArray *child_group;
 		gint    j;
 
-		child_group = node->child_nodes;
+		child_group = pnode->child_nodes;
 		if (!child_group)
 			continue;
 
@@ -997,7 +997,7 @@
  * GtkTreeModel API *
  * ---------------- */
 
-static guint
+static GtkTreeModelFlags
 e_tree_model_generator_get_flags (GtkTreeModel *tree_model)
 {
 	ETreeModelGenerator *tree_model_generator = E_TREE_MODEL_GENERATOR (tree_model);
Index: libedataserverui/e-name-selector-dialog.c
===================================================================
--- libedataserverui/e-name-selector-dialog.c	(revisjon 7713)
+++ libedataserverui/e-name-selector-dialog.c	(arbeidskopi)
@@ -1277,7 +1277,7 @@
  * Widget creation functions for Glade *
  * ----------------------------------- */
 
-#if CATEGORIES_COMPONENTS_MOVED
+#ifdef CATEGORIES_COMPONENTS_MOVED
 
 GtkWidget *
 e_name_selector_dialog_create_categories (void)
Index: libedataserverui/e-name-selector-entry.c
===================================================================
--- libedataserverui/e-name-selector-entry.c	(revisjon 7713)
+++ libedataserverui/e-name-selector-entry.c	(arbeidskopi)
@@ -1299,12 +1299,12 @@
 
 	if (str_b_context [1] == '"') {
 		const gchar *p;
-		gint i;
+		gint j;
 		p = text + end_pos;
-		for (p = text + (end_pos-1), i = end_pos - 1; *p && *p != '"' ; p = g_utf8_next_char (p), i++) {
+		for (p = text + (end_pos-1), j = end_pos - 1; *p && *p != '"' ; p = g_utf8_next_char (p), j++) {
 			gunichar c = g_utf8_get_char (p);
 			if(c == ',') {
-				insert_destination_at_position (name_selector_entry, i+1);
+				insert_destination_at_position (name_selector_entry, j+1);
 			}
 		}
 		
@@ -2096,7 +2096,7 @@
 	if (is_list) {
 		const GList *dests = e_destination_list_get_dests (destination);
 		GList *iter;
-		int len = g_list_length ((GList *)dests);
+		int length = g_list_length ((GList *)dests);
 
 		for (iter = (GList *)dests; iter; iter = iter->next) {
 			EDestination *dest = (EDestination *) iter->data;
@@ -2105,7 +2105,7 @@
 			if (!email || *email == '\0')
 				continue;	
 
-			if (len > 1) {
+			if (length > 1) {
 				menu_item = gtk_check_menu_item_new_with_label (email);
 				g_signal_connect (menu_item, "toggled", G_CALLBACK (destination_set_list), dest);				
 			} else {
@@ -2116,7 +2116,7 @@
 			gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menu_item);
 			show_menu = TRUE;
 
-			if ( len > 1 ) {
+			if (length > 1) {
 				gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), !e_destination_is_ignored(dest));
 				g_signal_connect_swapped (menu_item, "activate", G_CALLBACK (popup_activate_list),
 							  dest);	
Index: libedataserverui/e-destination-store.c
===================================================================
--- libedataserverui/e-destination-store.c	(revisjon 7713)
+++ libedataserverui/e-destination-store.c	(arbeidskopi)
@@ -43,7 +43,7 @@
 static void         e_destination_store_class_init      (EDestinationStoreClass *class);
 static void         e_destination_store_tree_model_init (GtkTreeModelIface  *iface);
 static void         e_destination_store_finalize        (GObject            *object);
-static guint        e_destination_store_get_flags       (GtkTreeModel       *tree_model);
+static GtkTreeModelFlags e_destination_store_get_flags       (GtkTreeModel       *tree_model);
 static gint         e_destination_store_get_n_columns   (GtkTreeModel       *tree_model);
 static GType        e_destination_store_get_column_type (GtkTreeModel       *tree_model,
 							 gint                index);
@@ -477,7 +477,7 @@
  * GtkTreeModel API *
  * ---------------- */
 
-static guint
+static GtkTreeModelFlags 
 e_destination_store_get_flags (GtkTreeModel *tree_model)
 {
 	g_return_val_if_fail (E_IS_DESTINATION_STORE (tree_model), 0);
Index: libedataserverui/e-contact-store.c
===================================================================
--- libedataserverui/e-contact-store.c	(revisjon 7713)
+++ libedataserverui/e-contact-store.c	(arbeidskopi)
@@ -43,7 +43,7 @@
 static void         e_contact_store_class_init      (EContactStoreClass *class);
 static void         e_contact_store_tree_model_init (GtkTreeModelIface  *iface);
 static void         e_contact_store_finalize        (GObject            *object);
-static guint        e_contact_store_get_flags       (GtkTreeModel       *tree_model);
+static GtkTreeModelFlags e_contact_store_get_flags       (GtkTreeModel       *tree_model);
 static gint         e_contact_store_get_n_columns   (GtkTreeModel       *tree_model);
 static GType        e_contact_store_get_column_type (GtkTreeModel       *tree_model,
 						     gint                index);
@@ -1008,7 +1008,7 @@
  * GtkTreeModel API *
  * ---------------- */
 
-static guint
+static GtkTreeModelFlags
 e_contact_store_get_flags (GtkTreeModel *tree_model)
 {
 	g_return_val_if_fail (E_IS_CONTACT_STORE (tree_model), 0);
Index: libedataserverui/e-name-selector-model.c
===================================================================
--- libedataserverui/e-name-selector-model.c	(revisjon 7713)
+++ libedataserverui/e-name-selector-model.c	(arbeidskopi)
@@ -193,11 +193,8 @@
 	}
 
 	if (result) {
-		EContact *contact;
 		GList    *email_list;
 
-		contact = e_contact_store_get_contact (contact_store, iter);
-
 		if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
 			n_rows = 1;
 		} else {
Index: libedataserverui/e-name-selector-list.c
===================================================================
--- libedataserverui/e-name-selector-list.c	(revisjon 7713)
+++ libedataserverui/e-name-selector-list.c	(arbeidskopi)
@@ -407,17 +407,17 @@
 	is_list = e_contact_get (contact, E_CONTACT_IS_LIST) ? TRUE : FALSE;
 	if (is_list) {
 		const GList *dests = e_destination_list_get_dests (destination);
-		GList *iter;
-		int len = g_list_length ((GList *)dests);
+		GList *iters;
+		int length = g_list_length ((GList *)dests);
 
-		for (iter = (GList *)dests; iter; iter = iter->next) {
-			EDestination *dest = (EDestination *) iter->data;
+		for (iters = (GList *)dests; iters; iters = iters->next) {
+			EDestination *dest = (EDestination *) iters->data;
 			const char *email = e_destination_get_email (dest);
 			
 			if (!email || *email == '\0')
 				continue;	
 
-			if (len > 1) {
+			if (length > 1) {
 				menu_item = gtk_check_menu_item_new_with_label (email);
 				g_signal_connect (menu_item, "toggled", G_CALLBACK (destination_set_list), dest);				
 			} else {
@@ -428,7 +428,7 @@
 			gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menu_item);
 			show_menu = TRUE;
 
-			if ( len > 1 ) {
+			if (length > 1) {
 				gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), !e_destination_is_ignored(dest));
 				g_signal_connect_swapped (menu_item, "activate", G_CALLBACK (popup_activate_list),
 							  dest);	
Index: libedataserverui/e-source-option-menu.c
===================================================================
--- libedataserverui/e-source-option-menu.c	(revisjon 7713)
+++ libedataserverui/e-source-option-menu.c	(arbeidskopi)
@@ -124,29 +124,29 @@
 	i = 0;
 	for (p = groups; p != NULL; p = p->next) {
 		ESourceGroup *group = E_SOURCE_GROUP (p->data);
-		GtkWidget *item = gtk_menu_item_new_with_label (e_source_group_peek_name (group));
+		GtkWidget *item1 = gtk_menu_item_new_with_label (e_source_group_peek_name (group));
 		GSList *q;
 
-		gtk_widget_set_sensitive (item, FALSE);
-		gtk_widget_show (item);
-		gtk_menu_append (GTK_MENU (menu), item);
+		gtk_widget_set_sensitive (item1, FALSE);
+		gtk_widget_show (item1);
+		gtk_menu_append (GTK_MENU (menu), item1);
 
 		i ++;
 
 		for (q = e_source_group_peek_sources (group); q != NULL; q = q->next) {
 			ESource *source = E_SOURCE (q->data);
 			char *label = g_strconcat ("    ", e_source_peek_name (source), NULL);
-			GtkWidget *item = gtk_menu_item_new_with_label (label);
+			GtkWidget *item2 = gtk_menu_item_new_with_label (label);
 			g_free (label);
 
-			gtk_object_set_data_full (GTK_OBJECT (item), MENU_ITEM_SOURCE_DATA_ID, source,
+			gtk_object_set_data_full (GTK_OBJECT (item2), MENU_ITEM_SOURCE_DATA_ID, source,
 						  (GtkDestroyNotify) g_object_unref);
 			g_object_ref (source);
 
-			g_signal_connect (item, "activate", G_CALLBACK (menu_item_activate_callback), option_menu);
+			g_signal_connect (item2, "activate", G_CALLBACK (menu_item_activate_callback), option_menu);
 
-			gtk_widget_show (item);
-			gtk_menu_append (GTK_MENU (menu), item);
+			gtk_widget_show (item2);
+			gtk_menu_append (GTK_MENU (menu), item2);
 
 			if (first_source_item == -1) {
 				first_source_item = i;
Index: libedataserver/e-sexp.c
===================================================================
--- libedataserver/e-sexp.c	(revisjon 7713)
+++ libedataserver/e-sexp.c	(arbeidskopi)
@@ -1109,9 +1109,9 @@
 	/* load in builtin symbols? */
 	for(i=0;i<sizeof(symbols)/sizeof(symbols[0]);i++) {
 		if (symbols[i].type == 1) {
-			e_sexp_add_ifunction(s, 0, symbols[i].name, (ESExpIFunc *)symbols[i].func, &symbols[i]);
+			e_sexp_add_ifunction(s, 0, symbols[i].name, (ESExpIFunc *)symbols[i].func, (void *)&symbols[i]);
 		} else {
-			e_sexp_add_function(s, 0, symbols[i].name, symbols[i].func, &symbols[i]);
+			e_sexp_add_function(s, 0, symbols[i].name, symbols[i].func, (void *)&symbols[i]);
 		}
 	}
 
Index: addressbook/tests/ebook/test-photo.c
===================================================================
--- addressbook/tests/ebook/test-photo.c	(revisjon 7713)
+++ addressbook/tests/ebook/test-photo.c	(arbeidskopi)
@@ -3,7 +3,7 @@
 #include <string.h>
 #include <libebook/e-book.h>
 
-const char *photo_data = "/9j/4AAQSkZJRgABAQEARwBHAAD//gAXQ3JlYXRlZCB3aXRo\
+static const char *photo_data = "/9j/4AAQSkZJRgABAQEARwBHAAD//gAXQ3JlYXRlZCB3aXRo\
 IFRoZSBHSU1Q/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLC\
 McHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIy\
 MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgAMgAyAwEiAAIRAQMRAf\
Index: addressbook/tests/vcard/dump-vcard.c
===================================================================
--- addressbook/tests/vcard/dump-vcard.c	(revisjon 7713)
+++ addressbook/tests/vcard/dump-vcard.c	(arbeidskopi)
@@ -3,7 +3,7 @@
 #include <stdio.h>
 #include <libebook/e-vcard.h>
 
-FILE *fp;
+static FILE *fp;
 
 int
 main(int argc, char **argv)
Index: addressbook/libebook/e-book.c
===================================================================
--- addressbook/libebook/e-book.c	(revisjon 7713)
+++ addressbook/libebook/e-book.c	(arbeidskopi)
@@ -21,6 +21,7 @@
 
 #define d(x)
 
+/* Move this to e-book.h so it's declared properly? */
 GMainContext *_ebook_context;
 
 static GObjectClass *parent_class;
@@ -3803,6 +3804,7 @@
 {
 	EBook *book;
 
+        /* This returns FALSE not NULL. Open code this instead? */
 	e_return_error_if_fail (source && E_IS_SOURCE (source), E_BOOK_ERROR_INVALID_ARG);
 
 	e_book_activate ();
@@ -3836,6 +3838,7 @@
 	ESource *source;
 	EBook *book;
 
+	/* This returns FALSE not NULL. Open code this instead? */
 	e_return_error_if_fail (uri, E_BOOK_ERROR_INVALID_ARG);
 
 	group = e_source_group_new ("", uri);
Index: addressbook/libebook/e-contact.c
===================================================================
--- addressbook/libebook/e-contact.c	(revisjon 7713)
+++ addressbook/libebook/e-contact.c	(arbeidskopi)
@@ -809,9 +809,9 @@
 
 					for (params = e_vcard_attribute_get_params (attr); params; params = params->next) {
 						EVCardAttributeParam *param = params->data;
-						const char *name = e_vcard_attribute_param_get_name (param);
+						const char *param_name = e_vcard_attribute_param_get_name (param);
 
-						if (!g_ascii_strcasecmp (name, EVC_TYPE)) {
+						if (!g_ascii_strcasecmp (param_name, EVC_TYPE)) {
 							GList *values = e_vcard_attribute_param_get_values (param);
 							if (values && values->data) {
 								gboolean matches = FALSE;
@@ -1074,9 +1074,9 @@
 
 			for (params = e_vcard_attribute_get_params (attr); params; params = params->next) {
 				EVCardAttributeParam *param = params->data;
-				const char *name = e_vcard_attribute_param_get_name (param);
+				const char *param_name = e_vcard_attribute_param_get_name (param);
 
-				if (!g_ascii_strcasecmp (name, EVC_TYPE)) {
+				if (!g_ascii_strcasecmp (param_name, EVC_TYPE)) {
 					GList *values = e_vcard_attribute_param_get_values (param);
 					if (values && values->data) {
 						gboolean matches = FALSE;
Index: addressbook/libebook/e-vcard.c
===================================================================
--- addressbook/libebook/e-vcard.c	(revisjon 7713)
+++ addressbook/libebook/e-vcard.c	(arbeidskopi)
@@ -806,10 +806,10 @@
 	g_string_append (str, "VERSION:3.0" CRLF);
 
 	for (l = evc->priv->attributes; l; l = l->next) {
-		GList *p;
+		GList *list;
 		EVCardAttribute *attr = l->data;
 		GString *attr_str;
-		int l;
+		int len;
 
 		if (!g_ascii_strcasecmp (attr->name, "VERSION"))
 			continue;
@@ -828,8 +828,8 @@
 		g_string_append (attr_str, attr->name);
 
 		/* handle the parameters */
-		for (p = attr->params; p; p = p->next) {
-			EVCardAttributeParam *param = p->data;
+		for (list = attr->params; list; list = list->next) {
+			EVCardAttributeParam *param = list->data;
 			/* 5.8.2:
 			 * param        = param-name "=" param-value *("," param-value)
 			 */
@@ -839,14 +839,14 @@
 				g_string_append_c (attr_str, '=');
 				for (v = param->values; v; v = v->next) {
 					char *value = v->data;
-					char *p = value;
+					char *pval = value;
 					gboolean quotes = FALSE;
-					while (*p) {
-						if (!g_unichar_isalnum (g_utf8_get_char (p))) {
+					while (*pval) {
+						if (!g_unichar_isalnum (g_utf8_get_char (pval))) {
 							quotes = TRUE;
 							break;
 						}
-						p = g_utf8_next_char (p);
+						pval = g_utf8_next_char (pval);
 					}
 					if (quotes)
 						g_string_append_c (attr_str, '"');
@@ -885,20 +885,20 @@
 		 * When generating a content line, lines longer than 75
 		 * characters SHOULD be folded
 		 */
-		l = 0;
+		len = 0;
 		do {
 			
-			if ((g_utf8_strlen (attr_str->str, -1) -l) > 75) {
+			if ((g_utf8_strlen (attr_str->str, -1) - len) > 75) {
 				char *p;
 
-				l += 75;
-				p = g_utf8_offset_to_pointer (attr_str->str, l);
+				len += 75;
+				p = g_utf8_offset_to_pointer (attr_str->str, len);
 			
 				g_string_insert_len (attr_str, (p - attr_str->str), CRLF " ", sizeof (CRLF " ") - 1);
 			}
 			else
 				break;
-		} while (l < g_utf8_strlen (attr_str->str, -1));
+		} while (len < g_utf8_strlen (attr_str->str, -1));
 
 		g_string_append (attr_str, CRLF);
 
Index: addressbook/backends/ldap/e-book-backend-ldap.c
===================================================================
--- addressbook/backends/ldap/e-book-backend-ldap.c	(revisjon 7713)
+++ addressbook/backends/ldap/e-book-backend-ldap.c	(arbeidskopi)
@@ -114,7 +114,7 @@
 #define EVOLUTIONPERSON      "evolutionPerson"
 #define GROUPOFNAMES         "groupOfNames"
 
-gboolean enable_debug = FALSE;
+static gboolean enable_debug = FALSE;
 
 static gchar *query_prop_to_ldap(gchar *query_prop);
 static gchar *e_book_backend_ldap_build_query (EBookBackendLDAP *bl, const char *query);
@@ -257,7 +257,7 @@
 
 static void cert_populate (EContact *contact, struct berval **ber_values);
 
-struct prop_info {
+static struct prop_info {
 	EContactField field_id;
 	char *ldap_attr;
 #define PROP_TYPE_STRING    0x01
@@ -2269,6 +2269,7 @@
 
 	if (enable_debug)
 		printf ("contact_list_handler ...\n");
+		g_get_current_time (&start);
 	ldap = bl->priv->ldap;
 	if (!ldap) {
 		e_data_book_respond_get_contact_list (op->book, op->opid, GNOME_Evolution_Addressbook_OtherError, NULL);
@@ -2660,12 +2661,12 @@
 						char *dn_cur = NULL;
 
 						for (p_cur = e_vcard_attribute_get_params (attr_cur); p_cur; p_cur = p_cur->next) {
-							EVCardAttributeParam *param = p_cur->data;
-							const char *param_name2 = e_vcard_attribute_param_get_name (param);
+							EVCardAttributeParam *param2 = p_cur->data;
+							const char *param_name2 = e_vcard_attribute_param_get_name (param2);
 
 							if (!g_ascii_strcasecmp (param_name2, EVC_X_DEST_CONTACT_UID)) {
-								GList *v = e_vcard_attribute_param_get_values (param);
-								dn_cur = v ? v->data : NULL;
+								GList *v2 = e_vcard_attribute_param_get_values (param2);
+								dn_cur = v2 ? v2->data : NULL;
 							
 								if (dn_cur) {
 									if (!g_ascii_strcasecmp (dn_new, dn_cur)) {
@@ -3836,7 +3837,7 @@
 						}
 						else if (info->prop_type & PROP_TYPE_GROUP) {
 							char *grpattrs[3];
-							int i, view_limit = -1, ldap_error, count;
+							int j, view_limit = -1, ldap_error, count;
 							EDataBookView *book_view;
 							LDAPMessage *result;
 							char **email_values, **cn_values, **member_info;
@@ -3856,13 +3857,13 @@
 							count = ldap_count_values (values);
 							member_info = g_new0 (gchar *, count+1);
 
-							for (i = 0; values[i] ; i ++) {
+							for (j = 0; values[j] ; j++) {
 								/* get the email id for the given dn */
 								/* set base to DN and scope to base */
-								printf ("value (dn) = %s \n", values [i]);
+								printf ("value (dn) = %s \n", values [j]);
 								do {
 									if ((ldap_error = ldap_search_ext_s (bl->priv->ldap,
-						    						        values[i],
+						    						        values[j],
 						    						        LDAP_SCOPE_BASE,
 						    						        NULL,
 						    						        grpattrs, 0, 
@@ -3879,13 +3880,13 @@
 											printf ("email = %s \n", email_values[0]);
 											*(member_info + i) = 
 												g_strdup_printf ("%s;%s;", 
-														 email_values[0], values[i]);
+														 email_values[0], values[j]);
 											ldap_value_free (email_values);
 										}
 										if (cn_values) {
 											printf ("cn = %s \n", cn_values[0]);
-											*(member_info + i) = 
-												g_strconcat (*(member_info + i), 
+											*(member_info + j) = 
+												g_strconcat (*(member_info + j), 
 													     cn_values [0], NULL);
 											ldap_value_free (cn_values);
 										}
@@ -3902,8 +3903,8 @@
 							/* call populate function */	
 							info->populate_contact_func (contact, member_info); 
 						
-							for (i = 0; i < count; i++) {
-                						g_free (*(member_info + i));
+							for (j = 0; j < count; j++) {
+                						g_free (*(member_info + j));
         						}
         						g_free (member_info);	
 						}
Index: calendar/libedata-cal/e-data-cal-view.c
===================================================================
--- calendar/libedata-cal/e-data-cal-view.c	(revisjon 7713)
+++ calendar/libedata-cal/e-data-cal-view.c	(arbeidskopi)
@@ -239,14 +239,13 @@
 				ld->notified_start = TRUE;
 
 				if (priv->done && !ld->notified_done) {
-					CORBA_Environment ev;
 
 					ld->notified_done = TRUE;
 
-					CORBA_exception_init (&ev);
+					CORBA_exception_init (ev);
 					GNOME_Evolution_Calendar_CalViewListener_notifyQueryDone (
-						ld->listener, priv->done_status, &ev);
-					CORBA_exception_free (&ev);
+						ld->listener, priv->done_status, ev);
+					CORBA_exception_free (ev);
 				}
 			}
 		}
Index: calendar/libedata-cal/e-cal-backend.c
===================================================================
--- calendar/libedata-cal/e-cal-backend.c	(revisjon 7713)
+++ calendar/libedata-cal/e-cal-backend.c	(arbeidskopi)
@@ -267,7 +267,7 @@
 }
 
 /* Object initialization func for the calendar backend */
-void
+static void
 e_cal_backend_init (ECalBackend *backend)
 {
 	ECalBackendPrivate *priv;
@@ -283,7 +283,7 @@
 	priv->queries_mutex = g_mutex_new ();
 }
 
-void
+static void
 e_cal_backend_finalize (GObject *object)
 {
 	ECalBackend *backend = (ECalBackend *)object;
Index: calendar/tests/ecal/test-ecal.c
===================================================================
--- calendar/tests/ecal/test-ecal.c	(revisjon 7713)
+++ calendar/tests/ecal/test-ecal.c	(arbeidskopi)
@@ -32,14 +32,14 @@
 #include <libecal/e-cal-time-util.h>
 #include <libical/ical.h>
 
-// start_testing_scaffold
+/* start_testing_scaffold */
 #define mu_assert(message, test) do { if (!(test)) return message; else { tests_passed++; return NULL;}} while (0)
 #define mu_run_test(test) do { char *message = test; tests_run++; \
                                 if (message) { cl_printf (client, "***Error***\n%s\n", message); break;} } while (0)
 
-int tests_run = 0;
-int tests_passed = 0;
-// end_testing_scaffold
+static int tests_run = 0;
+static int tests_passed = 0;
+/* end_testing_scaffold */
 
 static ECal *client1;
 static ECal *client2;
Index: calendar/backends/groupwise/e-cal-backend-groupwise.c
===================================================================
--- calendar/backends/groupwise/e-cal-backend-groupwise.c	(revisjon 7713)
+++ calendar/backends/groupwise/e-cal-backend-groupwise.c	(arbeidskopi)
@@ -349,20 +349,22 @@
 
 	serv_time = e_cal_backend_cache_get_server_utc_time (cache);
 	if (serv_time) {
+		icaltimetype tmp;
 		g_strlcpy (t_str, e_cal_backend_cache_get_server_utc_time (cache), 26);
 		if (!*t_str || !strcmp (t_str, "")) {
 			/* FIXME: When time-stamp is crashed, getting changes from current time */
 			g_warning ("\n\a Could not get the correct time stamp. \n\a");
-			temp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
-			current_time = icaltime_as_timet_with_zone (temp, icaltimezone_get_utc_timezone ());
+			tmp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
+			current_time = icaltime_as_timet_with_zone (tmp, icaltimezone_get_utc_timezone ());
 			gmtime_r (&current_time, &tm);
 			strftime (t_str, 26, "%Y-%m-%dT%H:%M:%SZ", &tm);
 		}
 	} else {
+		icaltimetype tmp;
 		/* FIXME: When time-stamp is crashed, getting changes from current time */
 		g_warning ("\n\a Could not get the correct time stamp. \n\a");
-		temp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
-		current_time = icaltime_as_timet_with_zone (temp, icaltimezone_get_utc_timezone ());
+		tmp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
+		current_time = icaltime_as_timet_with_zone (tmp, icaltimezone_get_utc_timezone ());
 		gmtime_r (&current_time, &tm);
 		strftime (t_str, 26, "%Y-%m-%dT%H:%M:%SZ", &tm);
 	}
@@ -590,7 +592,7 @@
 		for (l = item_list; l != NULL; l = l->next) {
 			ECalComponent *comp = NULL;
 			EGwItem *item = NULL;
-			char *temp = NULL;
+			char *tmp = NULL;
 
 			item = (EGwItem *) l->data;
 			comp = e_gw_item_to_cal_component (item, cbgw); 
@@ -601,9 +603,9 @@
 
 
 				if (kind == icalcomponent_isa (e_cal_component_get_icalcomponent (comp))) {
-					temp = e_cal_component_get_as_string (comp);
-					e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), temp);
-					g_free (temp);
+					tmp = e_cal_component_get_as_string (comp);
+					e_cal_backend_notify_object_created (E_CAL_BACKEND (cbgw), tmp);
+					g_free (tmp);
 				}
 				g_object_unref (comp);
 			}
@@ -1176,7 +1178,7 @@
 	ECalBackendGroupwisePrivate *priv;
 	ECalBackendSyncStatus status;
 	ECalSourceType source_type;
-	char *source;
+	char *source = NULL;
 	char *filename;
 	char *mangled_uri;
 	int i;
@@ -1206,12 +1208,12 @@
 	}
 
 	if (priv->mode == CAL_MODE_LOCAL) {
-		ESource *source;
+		ESource *esource;
 		const char *display_contents = NULL;
 			
 		cbgw->priv->read_only = TRUE;				
-		source = e_cal_backend_get_source (E_CAL_BACKEND (cbgw));
-		display_contents = e_source_get_property (source, "offline_sync");
+		esource = e_cal_backend_get_source (E_CAL_BACKEND (cbgw));
+		display_contents = e_source_get_property (esource, "offline_sync");
 		
 		if (!display_contents || !g_str_equal (display_contents, "1")) {
 			g_mutex_unlock (priv->mutex);	
@@ -1868,7 +1870,7 @@
 			e_cal_backend_cache_put_component (priv->cache, comp);
 			*calobj = e_cal_component_get_as_string (comp);
 		} else {
-			EGwConnectionStatus status;	
+			EGwConnectionStatus stat;
 			GList *list = NULL, *tmp;
 			GPtrArray *uid_array = g_ptr_array_new ();
 			for (l = uid_list; l; l = g_slist_next (l)) {
@@ -1876,12 +1878,12 @@
 			}
 			
 			/* convert uid_list to GPtrArray and get the items in a list */
-			status = e_gw_connection_get_items_from_ids (priv->cnc,
+			stat = e_gw_connection_get_items_from_ids (priv->cnc,
 					priv->container_id, 
 					"attachments recipients message recipientStatus default peek",
 					uid_array, &list);
 
-			if (status != E_GW_CONNECTION_STATUS_OK || (list == NULL) || (g_list_length (list) == 0)) {
+			if (stat != E_GW_CONNECTION_STATUS_OK || (list == NULL) || (g_list_length (list) == 0)) {
 				g_ptr_array_free (uid_array, TRUE);
 				return GNOME_Evolution_Calendar_OtherError;
 			}
@@ -2399,14 +2401,14 @@
 				found = TRUE;
 		} else {
 			ECalComponentId *id = e_cal_component_get_id (modif_comp);
-			ECalComponent *comp = NULL;
+			ECalComponent *component = NULL;
 
-			comp = e_cal_backend_cache_get_component (priv->cache, id->uid, id->rid);
+			component = e_cal_backend_cache_get_component (priv->cache, id->uid, id->rid);
 
-			if (!comp)
+			if (!component)
 				comps = g_slist_append (comps, g_object_ref (modif_comp));
 			else {
-				comps = g_slist_append (comps, comp);
+				comps = g_slist_append (comps, component);
 				found = TRUE;
  			}
  
@@ -2414,14 +2416,14 @@
 		}
  
 		for (l = comps; l != NULL; l = l->next) {
-			ECalComponent *comp = E_CAL_COMPONENT (l->data);
+			ECalComponent *component = E_CAL_COMPONENT (l->data);
 
 			if (pstatus == ICAL_PARTSTAT_DECLINED) {
-				ECalComponentId *id = e_cal_component_get_id (comp);
+				ECalComponentId *id = e_cal_component_get_id (component);
 
 				if (e_cal_backend_cache_remove_component (priv->cache, id->uid, id->rid)) {
 
-					e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbgw), id, e_cal_component_get_as_string (comp), NULL);
+					e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbgw), id, e_cal_component_get_as_string (component), NULL);
 				e_cal_component_free_id (id);
 
 				}
@@ -2429,9 +2431,9 @@
 			} else {
 				char *comp_str = NULL;
 
-				change_status (comp, pstatus, e_gw_connection_get_user_email (priv->cnc));
-				e_cal_backend_cache_put_component (priv->cache, comp);	
-				comp_str = e_cal_component_get_as_string (comp);
+				change_status (component, pstatus, e_gw_connection_get_user_email (priv->cnc));
+				e_cal_backend_cache_put_component (priv->cache, component);	
+				comp_str = e_cal_component_get_as_string (component);
 				
 				if (found)
 					e_cal_backend_notify_object_modified (E_CAL_BACKEND (cbgw), comp_str, comp_str);
@@ -2541,42 +2543,41 @@
 				status = e_gw_connection_retract_request (priv->cnc, id, retract_comment,
 						all_instances, FALSE);
 			if (status == E_GW_CONNECTION_STATUS_OK) {
-				ECalComponentId *id = NULL;
-
 				if (all_instances) {
 					char *old_object = NULL;
 					GSList *l, *comp_list = e_cal_backend_cache_get_components_by_uid (priv->cache, uid);
 					for (l = comp_list; l; l = l->next) {
-						ECalComponent *comp = E_CAL_COMPONENT (l->data);
-						ECalComponentId *id = e_cal_component_get_id (comp);
-						char *object = e_cal_component_get_as_string (comp);
+						ECalComponent *component = E_CAL_COMPONENT (l->data);
+						ECalComponentId *cid = e_cal_component_get_id (component);
+						char *object = e_cal_component_get_as_string (component);
 
-						if (e_cal_backend_cache_remove_component (priv->cache, id->uid, 
-								id->rid))
-						e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbgw), id, object, NULL);
+						if (e_cal_backend_cache_remove_component (priv->cache, cid->uid, 
+								cid->rid))
+						e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbgw), cid, object, NULL);
 						
-						e_cal_component_free_id (id);
+						e_cal_component_free_id (cid);
 						g_free (object);
-						g_object_unref (comp);
+						g_object_unref (component);
 					}
 
 					g_slist_free (comp_list);
 					g_free (old_object);
 				} else {
+					ECalComponentId *cid = NULL;
 					char * object;
 
-					id = e_cal_component_get_id (comp);
+					cid = e_cal_component_get_id (comp);
 					icalcomp = e_cal_component_get_icalcomponent (comp);
 					object = e_cal_component_get_as_string (comp);
 				
-					if (e_cal_backend_cache_remove_component (priv->cache, id->uid, 
-								id->rid)) {
-						e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbgw), id, 
+					if (e_cal_backend_cache_remove_component (priv->cache, cid->uid, 
+								cid->rid)) {
+						e_cal_backend_notify_object_removed (E_CAL_BACKEND (cbgw), cid, 
 							object, NULL);
 					}
 
 					g_free (object);
-					e_cal_component_free_id (id);
+					e_cal_component_free_id (cid);
 				}
 			}
 		}
@@ -2655,7 +2656,8 @@
 					*users = g_list_append (*users, g_strdup (attendee));
 			}
 			
-			g_object_unref (comp);	
+		g_object_unref (comp);	
+
 		}
 		*modified_calobj = g_strdup (calobj);
 	}
Index: calendar/backends/caldav/e-cal-backend-caldav.c
===================================================================
--- calendar/backends/caldav/e-cal-backend-caldav.c	(revisjon 7713)
+++ calendar/backends/caldav/e-cal-backend-caldav.c	(arbeidskopi)
@@ -1729,15 +1729,15 @@
 	}
 
 	if (online) {
-		CalDAVObject object;
+		CalDAVObject obj;
 	
-		object.href  = g_strdup (e_cal_component_get_href (cache_comp));
-		object.etag  = g_strdup (e_cal_component_get_etag (cache_comp));
-		object.cdata = NULL;
+		obj.href  = g_strdup (e_cal_component_get_href (cache_comp));
+		obj.etag  = g_strdup (e_cal_component_get_etag (cache_comp));
+		obj.cdata = NULL;
 
-		status = caldav_server_delete_object (cbdav, &object);
+		status = caldav_server_delete_object (cbdav, &obj);
 
-		caldav_object_free (&object, FALSE);
+		caldav_object_free (&obj, FALSE);
 		
 	} else {
 		/* mark component as out of synch */
@@ -1824,6 +1824,7 @@
 	ECalBackend              *backend;
 	ECalComponent            *ccomp;
 	struct icaltimetype       now;
+	ECalComponentId		 *id;
 	const char               *uid;	
 	const char               *rid;
 	char                     *ostr;
@@ -1953,9 +1954,11 @@
 			e_cal_backend_cache_remove_component (priv->cache,
 							      uid,
 							      rid);
-			
+
+			id = e_cal_component_get_id (ccomp);
+	
 			e_cal_backend_notify_object_removed (E_CAL_BACKEND (backend),
-							     uid,
+							     id,
 							     oostr,
 							     ostr);
 			break;
Index: calendar/libecal/e-cal-recur.c
===================================================================
--- calendar/libecal/e-cal-recur.c	(revisjon 7713)
+++ calendar/libecal/e-cal-recur.c	(arbeidskopi)
@@ -510,7 +510,7 @@
 #endif
 
 
-ECalRecurVTable cal_obj_yearly_vtable = {
+static ECalRecurVTable cal_obj_yearly_vtable = {
 	cal_obj_yearly_find_start_position,
 	cal_obj_yearly_find_next_position,
 
@@ -524,7 +524,7 @@
 	cal_obj_bysecond_expand
 };
 
-ECalRecurVTable cal_obj_monthly_vtable = {
+static ECalRecurVTable cal_obj_monthly_vtable = {
 	cal_obj_monthly_find_start_position,
 	cal_obj_monthly_find_next_position,
 
@@ -538,7 +538,7 @@
 	cal_obj_bysecond_expand
 };
 
-ECalRecurVTable cal_obj_weekly_vtable = {
+static ECalRecurVTable cal_obj_weekly_vtable = {
 	cal_obj_weekly_find_start_position,
 	cal_obj_weekly_find_next_position,
 
@@ -552,7 +552,7 @@
 	cal_obj_bysecond_expand
 };
 
-ECalRecurVTable cal_obj_daily_vtable = {
+static ECalRecurVTable cal_obj_daily_vtable = {
 	cal_obj_daily_find_start_position,
 	cal_obj_daily_find_next_position,
 
@@ -566,7 +566,7 @@
 	cal_obj_bysecond_expand
 };
 
-ECalRecurVTable cal_obj_hourly_vtable = {
+static ECalRecurVTable cal_obj_hourly_vtable = {
 	cal_obj_hourly_find_start_position,
 	cal_obj_hourly_find_next_position,
 
@@ -580,7 +580,7 @@
 	cal_obj_bysecond_expand
 };
 
-ECalRecurVTable cal_obj_minutely_vtable = {
+static ECalRecurVTable cal_obj_minutely_vtable = {
 	cal_obj_minutely_find_start_position,
 	cal_obj_minutely_find_next_position,
 
@@ -594,7 +594,7 @@
 	cal_obj_bysecond_expand
 };
 
-ECalRecurVTable cal_obj_secondly_vtable = {
+static ECalRecurVTable cal_obj_secondly_vtable = {
 	cal_obj_secondly_find_start_position,
 	cal_obj_secondly_find_next_position,
 
Index: calendar/libecal/e-cal.c
===================================================================
--- calendar/libecal/e-cal.c	(revisjon 7713)
+++ calendar/libecal/e-cal.c	(arbeidskopi)
@@ -1703,7 +1703,7 @@
 	ECalendarOp *our_op;
 	const char *username = NULL, *auth_type = NULL;
 	char *password = NULL;
-	gboolean read_only;
+	gboolean read_only = FALSE;
 	
 	e_return_error_if_fail (ecal != NULL, E_CALENDAR_STATUS_INVALID_ARG);
 	e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
@@ -5104,42 +5104,6 @@
 	E_CALENDAR_CHECK_STATUS (status, error);
 }
 
-
-/* This ensures that the given timezone is on the server. We use this to pass
-   the default timezone to the server, so it can resolve DATE and floating
-   DATE-TIME values into specific times. (Most of our IDL interface uses
-   time_t values to pass specific times from the server to the ecal.) */
-static gboolean
-e_cal_ensure_timezone_on_server (ECal *ecal, icaltimezone *zone, GError **error)
-{
-	ECalPrivate *priv;
-	char *tzid;
-	icaltimezone *tmp_zone;
-
-	priv = ecal->priv;
-
-	/* FIXME This is highly broken since there is no locking */
-
-	/* If the zone is NULL or UTC we don't need to do anything. */
-	if (!zone)
-		return TRUE;
-	
-	tzid = icaltimezone_get_tzid (zone);
-
-	if (!strcmp (tzid, "UTC"))
-		return TRUE;
-
-	/* See if we already have it in the cache. If we do, it must be on
-	   the server already. */
-	tmp_zone = g_hash_table_lookup (priv->timezones, tzid);
-	if (tmp_zone)
-		return TRUE;
-
-	/* Now we have to send it to the server, in case it doesn't already
-	   have it. */
-	return e_cal_add_timezone (ecal, zone, error);
-}
-
 /**
  * e_cal_set_default_timezone:
  * @ecal: A calendar client.
Index: calendar/libecal/e-cal-component.c
===================================================================
--- calendar/libecal/e-cal-component.c	(revisjon 7713)
+++ calendar/libecal/e-cal-component.c	(arbeidskopi)
@@ -1510,7 +1510,7 @@
 		struct attachment *attachment;
 		const char *data;
 		size_t buf_size;
-		char *buf;
+		char *buf = NULL;
 
 		attachment = l->data;
 		g_assert (attachment->attach != NULL);


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