[evolution-mapi] Fix compiler warnings introduced in gcc 4.6.0
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Fix compiler warnings introduced in gcc 4.6.0
- Date: Thu, 5 May 2011 08:15:44 +0000 (UTC)
commit 63c851845b44585a27fa4d2b706634e3adf0d9f9
Author: Milan Crha <mcrha redhat com>
Date: Thu May 5 10:14:56 2011 +0200
Fix compiler warnings introduced in gcc 4.6.0
.../exchange-mapi-account-settings.c | 5 +--
src/addressbook/e-book-backend-mapi.c | 3 -
src/calendar/e-cal-backend-mapi.c | 52 +-------------------
src/camel/camel-mapi-folder.c | 4 --
src/camel/camel-mapi-store.c | 10 ----
src/libexchangemapi/em-operation-queue.c | 2 +-
src/libexchangemapi/exchange-mapi-utils.c | 2 -
7 files changed, 3 insertions(+), 75 deletions(-)
---
diff --git a/src/account-setup-eplugin/exchange-mapi-account-settings.c b/src/account-setup-eplugin/exchange-mapi-account-settings.c
index cf5e566..234c15c 100644
--- a/src/account-setup-eplugin/exchange-mapi-account-settings.c
+++ b/src/account-setup-eplugin/exchange-mapi-account-settings.c
@@ -162,7 +162,6 @@ mapi_settings_run_folder_size_dialog (const gchar *profile, gpointer data)
GtkWidget *spinner, *alignment;
GtkWidget *spinner_label;
FolderSizeDialogData *dialog_data;
- GThread *folder_list_thread;
dialog_data = g_new0 (FolderSizeDialogData, 1);
@@ -195,7 +194,7 @@ mapi_settings_run_folder_size_dialog (const gchar *profile, gpointer data)
dialog_data->profile = g_strdup (profile);
/* Fetch folder list and size information in a thread */
- folder_list_thread = g_thread_create (mapi_settings_get_folder_size, dialog_data, TRUE, NULL);
+ g_thread_create (mapi_settings_get_folder_size, dialog_data, FALSE, NULL);
/* Start the dialog */
gtk_dialog_run (dialog_data->dialog);
@@ -282,7 +281,6 @@ action_folder_size_cb (GtkAction *action,
static void
folder_size_actions_update_cb (EShellView *shell_view, GtkActionEntry *entries)
{
- EShellContent *shell_content;
EShellWindow *shell_window;
GtkActionGroup *action_group;
GtkUIManager *ui_manager;
@@ -303,7 +301,6 @@ folder_size_actions_update_cb (EShellView *shell_view, GtkActionEntry *entries)
return;
}
- shell_content = e_shell_view_get_shell_content (shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
ui_manager = e_shell_window_get_ui_manager (shell_window);
diff --git a/src/addressbook/e-book-backend-mapi.c b/src/addressbook/e-book-backend-mapi.c
index 737641b..231ad35 100644
--- a/src/addressbook/e-book-backend-mapi.c
+++ b/src/addressbook/e-book-backend-mapi.c
@@ -178,13 +178,10 @@ ebbm_pick_book_view (EBookBackendMAPI *ebma)
EList *views = e_book_backend_get_book_views (E_BOOK_BACKEND (ebma));
EIterator *iter;
EDataBookView *rv = NULL;
- gint test;
if (!views)
return NULL;
- test = e_list_length (views);
-
iter = e_list_get_iterator (views);
if (!iter) {
diff --git a/src/calendar/e-cal-backend-mapi.c b/src/calendar/e-cal-backend-mapi.c
index 6946c15..703ab83 100644
--- a/src/calendar/e-cal-backend-mapi.c
+++ b/src/calendar/e-cal-backend-mapi.c
@@ -1385,9 +1385,6 @@ static gpointer
cache_init (ECalBackendMAPI *cbmapi)
{
ECalBackendMAPIPrivate *priv = cbmapi->priv;
- icalcomponent_kind kind;
-
- kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbmapi));
priv->mode = CAL_MODE_REMOTE;
@@ -1416,8 +1413,6 @@ static void
ecbm_connect (ECalBackendMAPI *cbmapi, GError **perror)
{
ECalBackendMAPIPrivate *priv;
- ESource *source;
- ECalSourceType source_type;
GThread *thread;
GError *error = NULL;
@@ -1428,8 +1423,6 @@ ecbm_connect (ECalBackendMAPI *cbmapi, GError **perror)
return;
}
- source = e_cal_backend_get_source (E_CAL_BACKEND (cbmapi));
-
if (!priv->conn || !exchange_mapi_connection_connected (priv->conn)) {
g_propagate_error (perror, EDC_ERROR (AuthenticationFailed));
return;
@@ -1449,21 +1442,6 @@ ecbm_connect (ECalBackendMAPI *cbmapi, GError **perror)
priv->mode_changed = FALSE;
- switch (e_cal_backend_get_kind (E_CAL_BACKEND (cbmapi))) {
- case ICAL_VEVENT_COMPONENT:
- source_type = E_CAL_SOURCE_TYPE_EVENT;
- break;
- case ICAL_VTODO_COMPONENT:
- source_type = E_CAL_SOURCE_TYPE_TODO;
- break;
- case ICAL_VJOURNAL_COMPONENT:
- source_type = E_CAL_SOURCE_TYPE_JOURNAL;
- break;
- default:
- source_type = E_CAL_SOURCE_TYPE_EVENT;
- break;
- }
-
/* spawn a new thread for caching the calendar items */
thread = g_thread_create ((GThreadFunc) cache_init, cbmapi, FALSE, &error);
if (!thread) {
@@ -1478,7 +1456,6 @@ ecbm_open (ECalBackend *backend, EDataCal *cal, gboolean only_if_exists, const g
{
ECalBackendMAPI *cbmapi;
ECalBackendMAPIPrivate *priv;
- ECalSourceType source_type;
ESource *esource;
const gchar *fid = NULL;
const gchar *cache_dir;
@@ -1503,21 +1480,16 @@ ecbm_open (ECalBackend *backend, EDataCal *cal, gboolean only_if_exists, const g
cbmapi->priv->read_only = FALSE;
switch (e_cal_backend_get_kind (E_CAL_BACKEND (cbmapi))) {
+ default:
case ICAL_VEVENT_COMPONENT:
- source_type = E_CAL_SOURCE_TYPE_EVENT;
olFolder = olFolderCalendar;
break;
case ICAL_VTODO_COMPONENT:
- source_type = E_CAL_SOURCE_TYPE_TODO;
olFolder = olFolderTasks;
break;
case ICAL_VJOURNAL_COMPONENT:
- source_type = E_CAL_SOURCE_TYPE_JOURNAL;
olFolder = olFolderNotes;
break;
- default:
- source_type = E_CAL_SOURCE_TYPE_EVENT;
- break;
}
if (priv->store) {
@@ -2707,7 +2679,6 @@ ecbm_compute_changes_foreach_key (const gchar *key, const gchar *value, gpointer
static void
ecbm_compute_changes (ECalBackendMAPI *cbmapi, const gchar *change_id, GList **adds, GList **modifies, GList **deletes, GError **perror)
{
- ECalBackendStore *store;
gchar *filename;
EXmlHash *ehash;
ECalBackendMAPIComputeChangesData be_data;
@@ -2715,8 +2686,6 @@ ecbm_compute_changes (ECalBackendMAPI *cbmapi, const gchar *change_id, GList **a
gchar *unescaped_uri;
GError *err = NULL;
- store = cbmapi->priv->store;
-
/* FIXME Will this always work? */
unescaped_uri = g_uri_unescape_string (cbmapi->priv->uri, "");
filename = g_strdup_printf ("%s-%s.db", unescaped_uri, change_id);
@@ -2803,14 +2772,9 @@ ecbm_is_loaded (ECalBackend *backend)
static void
ecbm_start_query (ECalBackend *backend, EDataCalView *query)
{
- ECalBackendMAPI *cbmapi;
- ECalBackendMAPIPrivate *priv;
GList *objects = NULL;
GError *err = NULL;
- cbmapi = E_CAL_BACKEND_MAPI (backend);
- priv = cbmapi->priv;
-
ecbm_get_object_list (backend, NULL, e_data_cal_view_get_text (query), &objects, &err);
if (err) {
e_data_cal_view_notify_done (query, err);
@@ -3719,19 +3683,6 @@ ecbm_op_get_free_busy (ECalBackend *backend, EDataCal *cal, EServerMethodContext
STR_OP_DEF (ecbm_op_get_changes, OP_GET_CHANGES)
static void
-ecbm_dispose (GObject *object)
-{
- ECalBackendMAPI *cbmapi;
- ECalBackendMAPIPrivate *priv;
-
- cbmapi = E_CAL_BACKEND_MAPI (object);
- priv = cbmapi->priv;
-
- if (G_OBJECT_CLASS (e_cal_backend_mapi_parent_class)->dispose)
- (* G_OBJECT_CLASS (e_cal_backend_mapi_parent_class)->dispose) (object);
-}
-
-static void
ecbm_finalize (GObject *object)
{
ECalBackendMAPI *cbmapi;
@@ -3852,7 +3803,6 @@ e_cal_backend_mapi_class_init (ECalBackendMAPIClass *class)
object_class = (GObjectClass *) class;
backend_class = (ECalBackendClass *) class;
- object_class->dispose = ecbm_dispose;
object_class->finalize = ecbm_finalize;
/* functions done asynchronously */
diff --git a/src/camel/camel-mapi-folder.c b/src/camel/camel-mapi-folder.c
index f867c79..d978bb6 100644
--- a/src/camel/camel-mapi-folder.c
+++ b/src/camel/camel-mapi-folder.c
@@ -317,7 +317,6 @@ mapi_update_cache (CamelFolder *folder, GSList *list, CamelFolderChangeInfo **ch
CamelMapiStore *mapi_store;
CamelStore *parent_store;
- guint32 status_flags = 0;
CamelFolderChangeInfo *changes = NULL;
gboolean exists = FALSE;
GString *str = g_string_new (NULL);
@@ -349,13 +348,10 @@ mapi_update_cache (CamelFolder *folder, GSList *list, CamelFolderChangeInfo **ch
MailItem *temp_item;
MailItem *item;
gchar *msg_uid;
- guint64 id;
exists = FALSE;
- status_flags = 0;
temp_item = (MailItem *)item_list->data;
- id = temp_item->mid;
item = temp_item;
camel_operation_progress (cancellable, (100*i)/total_items);
diff --git a/src/camel/camel-mapi-store.c b/src/camel/camel-mapi-store.c
index 7ed9c8e..7e91c73 100644
--- a/src/camel/camel-mapi-store.c
+++ b/src/camel/camel-mapi-store.c
@@ -757,9 +757,6 @@ mapi_forget_folder (CamelMapiStore *mapi_store, const gchar *folder_name, GError
gchar *state_file;
gchar *folder_dir, *storage_path;
CamelFolderInfo *fi;
- const gchar *name;
-
- name = folder_name;
service = CAMEL_SERVICE (mapi_store);
user_data_dir = camel_service_get_user_data_dir (service);
@@ -1751,16 +1748,9 @@ mapi_connect_sync (CamelService *service,
{
CamelMapiStore *store = CAMEL_MAPI_STORE (service);
CamelServiceConnectionStatus status;
- CamelProvider *provider;
- CamelSession *session;
- CamelURL *url;
guint16 event_mask = 0;
- url = camel_service_get_camel_url (service);
- session = camel_service_get_session (service);
- provider = camel_service_get_provider (service);
status = camel_service_get_connection_status (service);
-
if (status == CAMEL_SERVICE_DISCONNECTED) {
return FALSE;
}
diff --git a/src/libexchangemapi/em-operation-queue.c b/src/libexchangemapi/em-operation-queue.c
index ad3a6b9..7a3cb9d 100644
--- a/src/libexchangemapi/em-operation-queue.c
+++ b/src/libexchangemapi/em-operation-queue.c
@@ -141,7 +141,7 @@ thread_func_cb (gpointer data, gpointer pqueue)
UNLOCK ();
if (priv->worker_cb)
- priv->worker_cb (op->worker_data, cancelled, priv->user_data);
+ priv->worker_cb (worker_data, cancelled, priv->user_data);
g_object_unref (queue);
g_free (op);
diff --git a/src/libexchangemapi/exchange-mapi-utils.c b/src/libexchangemapi/exchange-mapi-utils.c
index c4b20f7..785794c 100644
--- a/src/libexchangemapi/exchange-mapi-utils.c
+++ b/src/libexchangemapi/exchange-mapi-utils.c
@@ -909,7 +909,6 @@ exchange_lf_to_crlf (const gchar *in)
gchar *
exchange_crlf_to_lf (const gchar *in)
{
- gint len;
const gchar *s;
gchar *out;
GString *str;
@@ -918,7 +917,6 @@ exchange_crlf_to_lf (const gchar *in)
str = g_string_new ("");
- len = strlen (in);
for (s = in; *s; s++) {
if (*s != '\r')
str = g_string_append_c (str, *s);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]