[evolution-mapi] Remove redundant type casts and fix newly introduced compiler warnings



commit e4524b0a0d90a668aac821e9e54e5cccc05bef5c
Author: Milan Crha <mcrha redhat com>
Date:   Mon Jan 14 10:12:22 2013 +0100

    Remove redundant type casts and fix newly introduced compiler warnings

 src/addressbook/e-book-backend-mapi.c          |   14 +++++++-------
 src/calendar/e-cal-backend-mapi.c              |   14 +++++++-------
 src/camel/camel-mapi-transport.c               |    2 +-
 src/collection/e-mapi-backend.c                |    8 ++++----
 src/configuration/e-mail-config-mapi-backend.c |    2 +-
 src/libexchangemapi/e-mapi-cal-tz-utils.c      |   10 ++--------
 6 files changed, 22 insertions(+), 28 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-mapi.c b/src/addressbook/e-book-backend-mapi.c
index 7e1930b..f2c496d 100644
--- a/src/addressbook/e-book-backend-mapi.c
+++ b/src/addressbook/e-book-backend-mapi.c
@@ -124,7 +124,7 @@ ebbm_pick_book_view (EBookBackendMAPI *ebma)
 		pick = g_object_ref (list->data);
 	}
 
-	g_list_free_full (list, (GDestroyNotify) g_object_unref);
+	g_list_free_full (list, g_object_unref);
 
 	return pick;
 }
@@ -145,7 +145,7 @@ complete_views (EBookBackendMAPI *ebma)
 		e_data_book_view_notify_complete (view, NULL);
 	}
 
-	g_list_free_full (list, (GDestroyNotify) g_object_unref);
+	g_list_free_full (list, g_object_unref);
 }
 
 static void
@@ -933,10 +933,10 @@ ebbm_operation_cb (OperationBase *op, gboolean cancelled, EBookBackend *backend)
 
 			e_data_book_respond_create_contacts (op->book, op->opid, error, added_contacts);
 
-			g_slist_free_full (added_contacts, (GDestroyNotify) g_object_unref);
+			g_slist_free_full (added_contacts, g_object_unref);
 		}
 
-		g_slist_free_full (ops->str_slist, (GDestroyNotify) g_free);
+		g_slist_free_full (ops->str_slist, g_free);
 	} break;
 	case OP_REMOVE_CONTACTS: {
 		OperationStrSlist *ops = (OperationStrSlist *) op;
@@ -970,7 +970,7 @@ ebbm_operation_cb (OperationBase *op, gboolean cancelled, EBookBackend *backend)
 			g_slist_free (removed_ids);
 		}
 
-		g_slist_free_full (ops->str_slist, (GDestroyNotify) g_free);
+		g_slist_free_full (ops->str_slist, g_free);
 	} break;
 	case OP_MODIFY_CONTACTS: {
 		OperationStrSlist *ops = (OperationStrSlist *) op;
@@ -997,10 +997,10 @@ ebbm_operation_cb (OperationBase *op, gboolean cancelled, EBookBackend *backend)
 
 			e_data_book_respond_modify_contacts (op->book, op->opid, error, modified_contacts);
 
-			g_slist_free_full (modified_contacts, (GDestroyNotify) g_object_unref);
+			g_slist_free_full (modified_contacts, g_object_unref);
 		}
 
-		g_slist_free_full (ops->str_slist, (GDestroyNotify) g_free);
+		g_slist_free_full (ops->str_slist, g_free);
 	} break;
 	case OP_GET_CONTACT: {
 		OperationStr *ops = (OperationStr *) op;
diff --git a/src/calendar/e-cal-backend-mapi.c b/src/calendar/e-cal-backend-mapi.c
index 869b5fa..9553ddb 100644
--- a/src/calendar/e-cal-backend-mapi.c
+++ b/src/calendar/e-cal-backend-mapi.c
@@ -429,7 +429,7 @@ notify_view_progress (ECalBackendMAPI *cbmapi, guint index, guint total)
 		e_data_cal_view_notify_progress (view, percent, progress_string);
 	}
 
-	g_list_free_full (list, (GDestroyNotify) g_object_unref);
+	g_list_free_full (list, g_object_unref);
 
 	g_free (progress_string);
 }
@@ -453,7 +453,7 @@ notify_view_completed (ECalBackendMAPI *cbmapi)
 		e_data_cal_view_notify_complete (view, NULL);
 	}
 
-	g_list_free_full (list, (GDestroyNotify) g_object_unref);
+	g_list_free_full (list, g_object_unref);
 }
 
 static icaltimezone *
@@ -2725,11 +2725,11 @@ ecbm_operation_cb (OperationBase *op, gboolean cancelled, ECalBackend *backend)
 			e_data_cal_respond_create_objects (op->cal, op->opid, error, uids, new_components);
 
 			/* free memory */
-			g_slist_free_full (uids, (GDestroyNotify) g_free);
+			g_slist_free_full (uids, g_free);
 			e_util_free_nullable_object_slist (new_components);
 		}
 
-		g_slist_free_full (opc->calobjs, (GDestroyNotify) g_free);
+		g_slist_free_full (opc->calobjs, g_free);
 	} break;
 	case OP_MODIFY_OBJECTS: {
 		OperationModify *opm = (OperationModify *) op;
@@ -2763,7 +2763,7 @@ ecbm_operation_cb (OperationBase *op, gboolean cancelled, ECalBackend *backend)
 			e_util_free_nullable_object_slist (new_components);
 		}
 
-		g_slist_free_full (opm->calobjs, (GDestroyNotify) g_free);
+		g_slist_free_full (opm->calobjs, g_free);
 	} break;
 	case OP_REMOVE_OBJECTS: {
 		OperationRemove *opr = (OperationRemove *) op;
@@ -3204,7 +3204,7 @@ ecbm_op_create_objects (ECalBackend *backend,
 	op->base.cal = cal;
 	op->base.opid = opid;
 	op->base.cancellable = cancellable;
-	op->calobjs = g_slist_copy_deep (calobjs, (GCopyFunc) g_strdup, NULL);
+	op->calobjs = g_slist_copy_deep ((GSList *) calobjs, (GCopyFunc) g_strdup, NULL);
 
 	e_mapi_operation_queue_push (priv->op_queue, op);
 }
@@ -3239,7 +3239,7 @@ ecbm_op_modify_objects (ECalBackend *backend,
 	op->base.cal = cal;
 	op->base.opid = opid;
 	op->base.cancellable = cancellable;
-	op->calobjs = g_slist_copy_deep (calobjs, (GCopyFunc) g_strdup, NULL);
+	op->calobjs = g_slist_copy_deep ((GSList *) calobjs, (GCopyFunc) g_strdup, NULL);
 	op->mod = mod;
 
 	e_mapi_operation_queue_push (priv->op_queue, op);
diff --git a/src/camel/camel-mapi-transport.c b/src/camel/camel-mapi-transport.c
index df281f4..c477865 100644
--- a/src/camel/camel-mapi-transport.c
+++ b/src/camel/camel-mapi-transport.c
@@ -128,7 +128,7 @@ mapi_send_to_sync (CamelTransport *transport,
 			}
 		}
 
-		g_list_free_full (services, (GDestroyNotify) g_object_unref);
+		g_list_free_full (services, g_object_unref);
 	}
 
 	conn = e_mapi_connection_find (profile);
diff --git a/src/collection/e-mapi-backend.c b/src/collection/e-mapi-backend.c
index 2fd8ed2..f8b6630 100644
--- a/src/collection/e-mapi-backend.c
+++ b/src/collection/e-mapi-backend.c
@@ -804,10 +804,10 @@ e_mapi_backend_init (EMapiBackend *backend)
 	backend->priv = E_MAPI_BACKEND_GET_PRIVATE (backend);
 
 	backend->priv->folders = g_hash_table_new_full (
-		(GHashFunc) g_str_hash,
-		(GEqualFunc) g_str_equal,
-		(GDestroyNotify) g_free,
-		(GDestroyNotify) g_object_unref);
+		g_str_hash,
+		g_str_equal,
+		g_free,
+		g_object_unref);
 }
 
 void
diff --git a/src/configuration/e-mail-config-mapi-backend.c b/src/configuration/e-mail-config-mapi-backend.c
index 8370bd8..cc2f1d1 100644
--- a/src/configuration/e-mail-config-mapi-backend.c
+++ b/src/configuration/e-mail-config-mapi-backend.c
@@ -802,7 +802,7 @@ mail_config_mapi_backend_insert_widgets (EMailConfigServiceBackend *backend,
 		G_BINDING_SYNC_CREATE,
 		transform_security_method_to_boolean,
 		transform_boolean_to_security_method,
-		NULL, (GDestroyNotify) NULL);
+		NULL, NULL);
 
 	krb_sso = gtk_check_button_new_with_mnemonic (_("_Kerberos authentication"));
 	gtk_widget_set_hexpand (secure_conn, TRUE);
diff --git a/src/libexchangemapi/e-mapi-cal-tz-utils.c b/src/libexchangemapi/e-mapi-cal-tz-utils.c
index 0e068ba..61908fa 100644
--- a/src/libexchangemapi/e-mapi-cal-tz-utils.c
+++ b/src/libexchangemapi/e-mapi-cal-tz-utils.c
@@ -253,17 +253,11 @@ e_mapi_cal_tz_util_populate (void)
 		return FALSE;
 	}
 
-	mapi_to_ical = g_hash_table_new_full   ((GHashFunc) g_str_hash,
-						(GEqualFunc) g_str_equal,
-						(GDestroyNotify) g_free,
-						(GDestroyNotify) g_free);
+	mapi_to_ical = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
 
 	file_contents_to_hashtable (g_mapped_file_get_contents (mtoi_mf), mapi_to_ical);
 
-	ical_to_mapi = g_hash_table_new_full   ((GHashFunc) g_str_hash,
-						(GEqualFunc) g_str_equal,
-						(GDestroyNotify) g_free,
-						(GDestroyNotify) g_free);
+	ical_to_mapi = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
 
 	file_contents_to_hashtable (g_mapped_file_get_contents (itom_mf), ical_to_mapi);
 



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