[empathy] fix unused-but-set-variable warnings
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] fix unused-but-set-variable warnings
- Date: Thu, 5 May 2011 07:50:22 +0000 (UTC)
commit 981d17576bb3451bd4ac79cbd2de079fb64d260b
Author: Marc Plano-Lesay <marc planolesay gmail com>
Date: Wed May 4 14:35:07 2011 +0200
fix unused-but-set-variable warnings
libempathy-gtk/empathy-account-widget.c | 3 ---
libempathy-gtk/empathy-contact-widget.c | 14 ++------------
src/empathy-accounts-dialog.c | 20 --------------------
src/empathy-auth-client.c | 3 +--
src/empathy-chat-window.c | 9 ---------
src/empathy-event-manager.c | 10 ----------
src/empathy-ft-manager.c | 3 ---
src/empathy-new-chatroom-dialog.c | 7 -------
src/empathy-preferences.c | 6 +-----
src/ev-sidebar.c | 2 --
tests/interactive/contact-manager.c | 3 +--
11 files changed, 5 insertions(+), 75 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 6bbfc9a..dfa9ecd 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -2210,9 +2210,6 @@ do_dispose (GObject *obj)
if (priv->settings != NULL)
{
- TpAccount *account;
- account = empathy_account_settings_get_account (priv->settings);
-
g_object_unref (priv->settings);
priv->settings = NULL;
}
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index acf206a..c4e3748 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -818,8 +818,10 @@ contact_widget_location_update (EmpathyContactWidget *information)
{
GHashTable *location;
GValue *value;
+#ifdef HAVE_LIBCHAMPLAIN
gdouble lat = 0.0, lon = 0.0;
gboolean has_position = TRUE;
+#endif
GtkWidget *label;
guint row = 0;
static const gchar* ordered_geolocation_keys[] = {
@@ -853,18 +855,6 @@ contact_widget_location_update (EmpathyContactWidget *information)
return;
}
- value = g_hash_table_lookup (location, EMPATHY_LOCATION_LAT);
- if (value == NULL)
- has_position = FALSE;
- else
- lat = g_value_get_double (value);
-
- value = g_hash_table_lookup (location, EMPATHY_LOCATION_LON);
- if (value == NULL)
- has_position = FALSE;
- else
- lon = g_value_get_double (value);
-
value = g_hash_table_lookup (location, EMPATHY_LOCATION_TIMESTAMP);
if (value == NULL)
{
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 734809f..14de1d3 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -1209,12 +1209,10 @@ accounts_dialog_button_remove_clicked_cb (GtkWidget *button,
{
EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
GtkTreeView *view;
- GtkTreeModel *model;
GtkTreeSelection *selection;
GtkTreeIter iter;
view = GTK_TREE_VIEW (priv->treeview);
- model = gtk_tree_view_get_model (view);
selection = gtk_tree_view_get_selection (view);
if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
return;
@@ -1491,14 +1489,12 @@ accounts_dialog_get_settings_iter (EmpathyAccountsDialog *dialog,
GtkTreeIter *iter)
{
GtkTreeView *view;
- GtkTreeSelection *selection;
GtkTreeModel *model;
gboolean ok;
EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
/* Update the status in the model */
view = GTK_TREE_VIEW (priv->treeview);
- selection = gtk_tree_view_get_selection (view);
model = gtk_tree_view_get_model (view);
for (ok = gtk_tree_model_get_iter_first (model, iter);
@@ -1528,14 +1524,12 @@ accounts_dialog_get_account_iter (EmpathyAccountsDialog *dialog,
GtkTreeIter *iter)
{
GtkTreeView *view;
- GtkTreeSelection *selection;
GtkTreeModel *model;
gboolean ok;
EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
/* Update the status in the model */
view = GTK_TREE_VIEW (priv->treeview);
- selection = gtk_tree_view_get_selection (view);
model = gtk_tree_view_get_model (view);
for (ok = gtk_tree_model_get_iter_first (model, iter);
@@ -1585,11 +1579,8 @@ static void
accounts_dialog_model_set_selected (EmpathyAccountsDialog *dialog,
EmpathyAccountSettings *settings)
{
- GtkTreeSelection *selection;
GtkTreeIter iter;
- EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview));
if (accounts_dialog_get_settings_iter (dialog, settings, &iter))
select_and_scroll_to_iter (dialog, &iter);
}
@@ -1831,14 +1822,12 @@ accounts_dialog_add_account (EmpathyAccountsDialog *dialog,
GtkTreeIter iter;
TpConnectionStatus status;
const gchar *name;
- gboolean enabled;
EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
gboolean selected = FALSE;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->treeview));
status = tp_account_get_connection_status (account, NULL);
name = tp_account_get_display_name (account);
- enabled = tp_account_is_enabled (account);
settings = empathy_account_settings_new_for_account (account);
@@ -1968,12 +1957,6 @@ enable_or_disable_account (EmpathyAccountsDialog *dialog,
TpAccount *account,
gboolean enabled)
{
- GtkTreeModel *model;
- EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
-
- /* Update the status in the model */
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->treeview));
-
/* Update the status-infobar in the details view */
accounts_dialog_update_status_infobar (dialog, account);
@@ -2036,11 +2019,8 @@ static void
accounts_dialog_set_selected_account (EmpathyAccountsDialog *dialog,
TpAccount *account)
{
- GtkTreeSelection *selection;
GtkTreeIter iter;
- EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview));
if (accounts_dialog_get_account_iter (dialog, account, &iter))
select_and_scroll_to_iter (dialog, &iter);
}
diff --git a/src/empathy-auth-client.c b/src/empathy-auth-client.c
index 68c4543..b7988e0 100644
--- a/src/empathy-auth-client.c
+++ b/src/empathy-auth-client.c
@@ -159,7 +159,6 @@ verifier_verify_cb (GObject *source,
GAsyncResult *result,
gpointer user_data)
{
- gboolean res;
EmpTLSCertificateRejectReason reason;
GError *error = NULL;
EmpathyTLSCertificate *certificate = NULL;
@@ -170,7 +169,7 @@ verifier_verify_cb (GObject *source,
"certificate", &certificate,
NULL);
- res = empathy_tls_verifier_verify_finish (EMPATHY_TLS_VERIFIER (source),
+ empathy_tls_verifier_verify_finish (EMPATHY_TLS_VERIFIER (source),
result, &reason, &details, &error);
if (error != NULL)
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 7faeb27..2aef5d9 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -259,7 +259,6 @@ chat_window_create_label (EmpathyChatWindow *window,
EmpathyChat *chat,
gboolean is_tab_label)
{
- EmpathyChatWindowPriv *priv;
GtkWidget *hbox;
GtkWidget *name_label;
GtkWidget *status_image;
@@ -268,8 +267,6 @@ chat_window_create_label (EmpathyChatWindow *window,
PangoAttrList *attr_list;
PangoAttribute *attr;
- priv = GET_PRIV (window);
-
/* The spacing between the button and the label. */
hbox = gtk_hbox_new (FALSE, 0);
@@ -1105,7 +1102,6 @@ chat_window_tabs_next_activate_cb (GtkAction *action,
EmpathyChatWindow *window)
{
EmpathyChatWindowPriv *priv;
- EmpathyChat *chat;
gint index_, numPages;
gboolean wrap_around;
@@ -1114,7 +1110,6 @@ chat_window_tabs_next_activate_cb (GtkAction *action,
g_object_get (gtk_settings_get_default (), "gtk-keynav-wrap-around",
&wrap_around, NULL);
- chat = priv->current_chat;
index_ = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook));
numPages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (priv->notebook));
@@ -1131,7 +1126,6 @@ chat_window_tabs_previous_activate_cb (GtkAction *action,
EmpathyChatWindow *window)
{
EmpathyChatWindowPriv *priv;
- EmpathyChat *chat;
gint index_, numPages;
gboolean wrap_around;
@@ -1140,7 +1134,6 @@ chat_window_tabs_previous_activate_cb (GtkAction *action,
g_object_get (gtk_settings_get_default (), "gtk-keynav-wrap-around",
&wrap_around, NULL);
- chat = priv->current_chat;
index_ = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook));
numPages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (priv->notebook));
@@ -2153,13 +2146,11 @@ empathy_chat_window_get_default (gboolean room)
}
for (l = chat_windows; l; l = l->next) {
- EmpathyChatWindowPriv *priv;
EmpathyChatWindow *chat_window;
GtkWidget *dialog;
guint nb_rooms, nb_private;
chat_window = l->data;
- priv = GET_PRIV (chat_window);
dialog = empathy_chat_window_get_dialog (chat_window);
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index 6125ec8..2786e07 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -335,9 +335,6 @@ static void
event_text_channel_process_func (EventPriv *event)
{
EmpathyTpChat *tp_chat;
- gint64 timestamp;
-
- timestamp = tp_user_action_time_from_x11 (gtk_get_current_event_time ());
if (event->approval->handler != 0)
{
@@ -566,7 +563,6 @@ event_manager_chat_message_received_cb (EmpathyTpChat *tp_chat,
EmpathyContact *sender;
const gchar *header;
const gchar *msg;
- TpChannel *channel;
EventPriv *event;
EmpathyEventManagerPriv *priv = GET_PRIV (approval->manager);
@@ -583,8 +579,6 @@ event_manager_chat_message_received_cb (EmpathyTpChat *tp_chat,
header = empathy_contact_get_alias (sender);
msg = empathy_message_get_body (message);
- channel = empathy_tp_chat_get_channel (tp_chat);
-
if (event != NULL)
event_update (approval->manager, event, EMPATHY_IMAGE_NEW_MESSAGE, header,
msg);
@@ -703,13 +697,9 @@ invite_dialog_response_cb (GtkDialog *dialog,
gint response,
EventManagerApproval *approval)
{
- EmpathyTpChat *tp_chat;
-
gtk_widget_destroy (GTK_WIDGET (approval->dialog));
approval->dialog = NULL;
- tp_chat = EMPATHY_TP_CHAT (approval->handler_instance);
-
if (response != GTK_RESPONSE_OK)
{
/* close channel */
diff --git a/src/empathy-ft-manager.c b/src/empathy-ft-manager.c
index edb470c..e23b0b4 100644
--- a/src/empathy-ft-manager.c
+++ b/src/empathy-ft-manager.c
@@ -696,11 +696,8 @@ static void
ft_manager_start_transfer (EmpathyFTManager *manager,
EmpathyFTHandler *handler)
{
- EmpathyFTManagerPriv *priv;
gboolean is_outgoing;
- priv = GET_PRIV (manager);
-
is_outgoing = !empathy_ft_handler_is_incoming (handler);
DEBUG ("Start transfer, is outgoing %s",
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index f27e8de..388a1e5 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -386,11 +386,8 @@ out:
static void
new_chatroom_dialog_update_widgets (EmpathyNewChatroomDialog *dialog)
{
- EmpathyAccountChooser *account_chooser;
const gchar *protocol;
- account_chooser = EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser);
-
if (dialog->account == NULL)
return;
@@ -535,8 +532,6 @@ new_chatroom_dialog_new_room_cb (EmpathyTpRoomlist *room_list,
EmpathyChatroom *chatroom,
EmpathyNewChatroomDialog *dialog)
{
- GtkTreeView *view;
- GtkTreeSelection *selection;
GtkListStore *store;
GtkTreeIter iter;
gchar *members;
@@ -550,8 +545,6 @@ new_chatroom_dialog_new_room_cb (EmpathyTpRoomlist *room_list,
empathy_chatroom_get_room (chatroom));
/* Add to model */
- view = GTK_TREE_VIEW (dialog->treeview);
- selection = gtk_tree_view_get_selection (view);
store = GTK_LIST_STORE (dialog->model);
members = g_strdup_printf ("%d", empathy_chatroom_get_members_count (chatroom));
tmp = g_strdup_printf ("<b>%s</b>", empathy_chatroom_get_name (chatroom));
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index 52bc3de..f90724c 100644
--- a/src/empathy-preferences.c
+++ b/src/empathy-preferences.c
@@ -320,7 +320,7 @@ preferences_sound_cell_toggled_cb (GtkCellRendererToggle *toggle,
{
EmpathyPreferencesPriv *priv = GET_PRIV (preferences);
GtkTreePath *path;
- gboolean toggled, instore;
+ gboolean instore;
GtkTreeIter iter;
GtkTreeView *view;
GtkTreeModel *model;
@@ -330,7 +330,6 @@ preferences_sound_cell_toggled_cb (GtkCellRendererToggle *toggle,
model = gtk_tree_view_get_model (view);
path = gtk_tree_path_new_from_string (path_string);
- toggled = gtk_cell_renderer_toggle_get_active (toggle);
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (model, &iter, COL_SOUND_KEY, &key,
@@ -419,7 +418,6 @@ preferences_languages_setup (EmpathyPreferences *preferences)
GtkTreeView *view;
GtkListStore *store;
GtkTreeSelection *selection;
- GtkTreeModel *model;
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
guint col_offset;
@@ -436,8 +434,6 @@ preferences_languages_setup (EmpathyPreferences *preferences)
selection = gtk_tree_view_get_selection (view);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- model = GTK_TREE_MODEL (store);
-
renderer = gtk_cell_renderer_toggle_new ();
g_signal_connect (renderer, "toggled",
G_CALLBACK (preferences_languages_cell_toggled_cb),
diff --git a/src/ev-sidebar.c b/src/ev-sidebar.c
index d0dd2b6..9c80537 100644
--- a/src/ev-sidebar.c
+++ b/src/ev-sidebar.c
@@ -64,10 +64,8 @@ static void
ev_sidebar_class_init (EvSidebarClass *ev_sidebar_class)
{
GObjectClass *g_object_class;
- GtkWidgetClass *widget_class;
g_object_class = G_OBJECT_CLASS (ev_sidebar_class);
- widget_class = GTK_WIDGET_CLASS (ev_sidebar_class);
g_type_class_add_private (g_object_class, sizeof (EvSidebarPrivate));
diff --git a/tests/interactive/contact-manager.c b/tests/interactive/contact-manager.c
index 7793b44..e391df6 100644
--- a/tests/interactive/contact-manager.c
+++ b/tests/interactive/contact-manager.c
@@ -12,7 +12,6 @@ int
main (int argc, char **argv)
{
EmpathyContactManager *manager;
- GMainLoop *main_loop;
EmpathyContactListStore *store;
GtkWidget *combo;
GtkWidget *window;
@@ -22,7 +21,7 @@ main (int argc, char **argv)
empathy_gtk_init ();
empathy_debug_set_flags (g_getenv ("EMPATHY_DEBUG"));
- main_loop = g_main_loop_new (NULL, FALSE);
+ g_main_loop_new (NULL, FALSE);
manager = empathy_contact_manager_dup_singleton ();
store = empathy_contact_list_store_new (EMPATHY_CONTACT_LIST (manager));
empathy_contact_list_store_set_is_compact (store, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]