[ekiga] Removed unused variables that gcc now complains about



commit 333e6d2cfc5cae40c5eecddd1c72f9dbb574e3b6
Author: Snark <jpuydt gnome org>
Date:   Tue May 3 14:22:33 2011 +0200

    Removed unused variables that gcc now complains about

 .../components/avahi-publisher/avahi-publisher.cpp |   27 +++++++++-----------
 lib/engine/components/avahi/avahi-heap.cpp         |   20 ++++++--------
 lib/engine/gui/gtk-frontend/addressbook-window.cpp |    5 +--
 lib/engine/gui/gtk-frontend/chat-window.cpp        |   10 +++----
 src/gui/main_window.cpp                            |   26 ++++++-------------
 src/gui/preferences.cpp                            |   21 +--------------
 src/gui/statusmenu.cpp                             |    2 -
 7 files changed, 36 insertions(+), 75 deletions(-)
---
diff --git a/lib/engine/components/avahi-publisher/avahi-publisher.cpp b/lib/engine/components/avahi-publisher/avahi-publisher.cpp
index 0e24ac2..9ebe44c 100644
--- a/lib/engine/components/avahi-publisher/avahi-publisher.cpp
+++ b/lib/engine/components/avahi-publisher/avahi-publisher.cpp
@@ -94,7 +94,6 @@ Avahi::PresencePublisher::publish (G_GNUC_UNUSED const Ekiga::PersonalDetails& d
 
     Ekiga::CallManager::InterfaceList interfaces;
     AvahiStringList* txt_record = NULL;
-    int ret;
 
     txt_record = prepare_txt_record ();
     for (Ekiga::CallCore::const_iterator iter = call_core.begin ();
@@ -117,12 +116,11 @@ Avahi::PresencePublisher::publish (G_GNUC_UNUSED const Ekiga::PersonalDetails& d
 			     iter->protocol.c_str ());
 
       /* FIXME: no collision checking here */
-      ret =
-	avahi_entry_group_update_service_txt_strlst (group, AVAHI_IF_UNSPEC,
-						     AVAHI_PROTO_UNSPEC,
-						     (AvahiPublishFlags)0,
-						     name, typ, NULL,
-						     txt_record);
+      avahi_entry_group_update_service_txt_strlst (group, AVAHI_IF_UNSPEC,
+						   AVAHI_PROTO_UNSPEC,
+						   (AvahiPublishFlags)0,
+						   name, typ, NULL,
+						   txt_record);
 
       g_free (typ);
     }
@@ -241,7 +239,6 @@ Avahi::PresencePublisher::add_services ()
 {
   Ekiga::CallManager::InterfaceList interfaces;
   AvahiStringList* txt_record = NULL;
-  int ret;
 
   for (Ekiga::CallCore::const_iterator iter = call_core.begin ();
        iter != call_core.end ();
@@ -265,17 +262,17 @@ Avahi::PresencePublisher::add_services ()
 			   iter->protocol.c_str ());
 
     /* FIXME: no collision checking here */
-    ret = avahi_entry_group_add_service_strlst (group, AVAHI_IF_UNSPEC,
-						AVAHI_PROTO_UNSPEC,
-						(AvahiPublishFlags)0,
-						name, typ,
-						NULL, NULL,
-						iter->port, txt_record);
+    avahi_entry_group_add_service_strlst (group, AVAHI_IF_UNSPEC,
+					  AVAHI_PROTO_UNSPEC,
+					  (AvahiPublishFlags)0,
+					  name, typ,
+					  NULL, NULL,
+					  iter->port, txt_record);
 
     g_free (typ);
   }
   avahi_string_list_free (txt_record);
-  ret = avahi_entry_group_commit (group);
+  avahi_entry_group_commit (group);
 }
 
 AvahiStringList*
diff --git a/lib/engine/components/avahi/avahi-heap.cpp b/lib/engine/components/avahi/avahi-heap.cpp
index 825c725..01ec503 100644
--- a/lib/engine/components/avahi/avahi-heap.cpp
+++ b/lib/engine/components/avahi/avahi-heap.cpp
@@ -146,8 +146,6 @@ void
 Avahi::Heap::ClientCallback (AvahiClient *_client,
 			     AvahiClientState state)
 {
-  AvahiServiceBrowser* browser = NULL;
-
   /* this is the good client pointer */
   client = _client;
 
@@ -164,16 +162,16 @@ Avahi::Heap::ClientCallback (AvahiClient *_client,
     client = NULL;
     break;
   case AVAHI_CLIENT_S_RUNNING:
-    /* this may not be the final valid browser pointer...
-     * we'll take what our callback gets
+    /* ignore what we get from the new, as it may not be the final
+     * valid browser pointer... we'll take what our callback gets
      */
-    browser = avahi_service_browser_new (client,
-					 AVAHI_IF_UNSPEC,
-					 AVAHI_PROTO_UNSPEC,
-					 "_sip._udp", NULL,
-					 (AvahiLookupFlags)0,
-					 avahi_browser_callback,
-					 this);
+    avahi_service_browser_new (client,
+			       AVAHI_IF_UNSPEC,
+			       AVAHI_PROTO_UNSPEC,
+			       "_sip._udp", NULL,
+			       (AvahiLookupFlags)0,
+			       avahi_browser_callback,
+			       this);
 #if DEBUG
     std::cout << __PRETTY_FUNCTION__ << " AVAHI_CLIENT_S_RUNNING" << std::endl;
     if (browser == NULL)
diff --git a/lib/engine/gui/gtk-frontend/addressbook-window.cpp b/lib/engine/gui/gtk-frontend/addressbook-window.cpp
index a249044..235f826 100644
--- a/lib/engine/gui/gtk-frontend/addressbook-window.cpp
+++ b/lib/engine/gui/gtk-frontend/addressbook-window.cpp
@@ -439,12 +439,11 @@ addressbook_window_add_book (AddressBookWindow *self,
   GtkTreeModel *store = NULL;
   GtkWidget *view = NULL;
   GdkPixbuf *icon = NULL;
-  gint page = -1;
 
   view = book_view_gtk_new (book);
 
-  page = gtk_notebook_append_page (GTK_NOTEBOOK (self->priv->notebook),
-                                   view, NULL);
+  gtk_notebook_append_page (GTK_NOTEBOOK (self->priv->notebook),
+			    view, NULL);
 
   if (gtk_widget_get_visible (GTK_WIDGET (self)))
     gtk_widget_show_all (view);
diff --git a/lib/engine/gui/gtk-frontend/chat-window.cpp b/lib/engine/gui/gtk-frontend/chat-window.cpp
index a862a98..8077bb8 100644
--- a/lib/engine/gui/gtk-frontend/chat-window.cpp
+++ b/lib/engine/gui/gtk-frontend/chat-window.cpp
@@ -285,7 +285,6 @@ on_simple_chat_added (ChatWindow* self,
   GtkWidget* label = NULL;
   GtkWidget* close_button = NULL;
   GtkWidget* close_image = NULL;
-  gint num;
 
   page = simple_chat_page_new (chat);
   hbox = gtk_hbox_new (FALSE, 2);
@@ -313,8 +312,8 @@ on_simple_chat_added (ChatWindow* self,
   g_object_set_data (G_OBJECT (hbox), "close-button-widget", close_button);
   gtk_widget_show_all (hbox);
 
-  num = gtk_notebook_append_page (GTK_NOTEBOOK (self->priv->notebook),
-				  page, hbox);
+  gtk_notebook_append_page (GTK_NOTEBOOK (self->priv->notebook),
+			    page, hbox);
   gtk_widget_show (page);
   g_signal_connect (page, "message-notice-event",
 		    G_CALLBACK (on_message_notice_event), self);
@@ -330,13 +329,12 @@ on_multiple_chat_added (ChatWindow* self,
 {
   GtkWidget* page = NULL;
   GtkWidget* label = NULL;
-  gint num;
 
   page = multiple_chat_page_new (chat);
   label = gtk_label_new (chat->get_title ().c_str ());
 
-  num = gtk_notebook_append_page (GTK_NOTEBOOK (self->priv->notebook),
-				  page, label);
+  gtk_notebook_append_page (GTK_NOTEBOOK (self->priv->notebook),
+			    page, label);
   gtk_widget_show_all (page);
 
   self->priv->connections.push_front (chat->user_requested.connect (boost::bind (&on_some_chat_user_requested, self, page)));
diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp
index 494e1b3..56e5166 100644
--- a/src/gui/main_window.cpp
+++ b/src/gui/main_window.cpp
@@ -2537,9 +2537,7 @@ window_closed_cb (G_GNUC_UNUSED GtkWidget *widget,
 		  gpointer data)
 {
   GtkStatusIcon *statusicon = NULL;
-  GtkWidget *main_window = NULL;
 
-  main_window = GnomeMeeting::Process ()->GetMainWindow ();
   statusicon = GTK_STATUS_ICON (GnomeMeeting::Process ()->GetStatusicon ());
 
   if (!gtk_status_icon_is_embedded (GTK_STATUS_ICON (statusicon)))
@@ -3024,8 +3022,6 @@ ekiga_main_window_incoming_call_dialog_show (EkigaMainWindow *mw,
 
   GtkWidget *label = NULL;
   GtkWidget *vbox = NULL;
-  GtkWidget *b1 = NULL;
-  GtkWidget *b2 = NULL;
   GtkWidget *incoming_call_popup = NULL;
 
   gchar *msg = NULL;
@@ -3039,10 +3035,10 @@ ekiga_main_window_incoming_call_dialog_show (EkigaMainWindow *mw,
   g_return_if_fail (EKIGA_IS_MAIN_WINDOW (mw));
 
   incoming_call_popup = gtk_dialog_new ();
-  b2 = gtk_dialog_add_button (GTK_DIALOG (incoming_call_popup),
-			      _("Reject"), 0);
-  b1 = gtk_dialog_add_button (GTK_DIALOG (incoming_call_popup),
-			      _("Accept"), 2);
+  gtk_dialog_add_button (GTK_DIALOG (incoming_call_popup),
+			 _("Reject"), 0);
+  gtk_dialog_add_button (GTK_DIALOG (incoming_call_popup),
+			 _("Accept"), 2);
 
   gtk_dialog_set_default_response (GTK_DIALOG (incoming_call_popup), 2);
 
@@ -3388,17 +3384,15 @@ ekiga_main_window_add_device_dialog_show (EkigaMainWindow *mw,
 {
   GtkWidget *label = NULL;
   GtkWidget *vbox = NULL;
-  GtkWidget *b1 = NULL;
-  GtkWidget *b2 = NULL;
   GtkWidget *add_device_popup = NULL;
 
   g_return_if_fail (EKIGA_IS_MAIN_WINDOW (mw));
 
   add_device_popup = gtk_dialog_new ();
-  b2 = gtk_dialog_add_button (GTK_DIALOG (add_device_popup),
-			      _("No"), 0);
-  b1 = gtk_dialog_add_button (GTK_DIALOG (add_device_popup),
-			      _("Yes"), 2);
+  gtk_dialog_add_button (GTK_DIALOG (add_device_popup),
+			 _("No"), 0);
+  gtk_dialog_add_button (GTK_DIALOG (add_device_popup),
+			 _("Yes"), 2);
 
   gtk_dialog_set_default_response (GTK_DIALOG (add_device_popup), 2);
 
@@ -4488,10 +4482,7 @@ GtkWidget *
 gm_main_window_new (Ekiga::ServiceCore & core)
 {
   GtkWidget *window = NULL;
-  EkigaMainWindow *mw = NULL;
-  
   GtkStatusIcon *status_icon = NULL;
-
   GtkWidget *chat_window = NULL;
 
   /* initialize the callback to play IM message sound */
@@ -4504,7 +4495,6 @@ gm_main_window_new (Ekiga::ServiceCore & core)
 
   /* The Top-level window */
   window = ekiga_main_window_new (&core);
-  mw = EKIGA_MAIN_WINDOW (window);
 
   /* Track status icon embed changes */
   /* FIXME: move this to the status icon code */
diff --git a/src/gui/preferences.cpp b/src/gui/preferences.cpp
index 1e9e1aa..2b9205c 100644
--- a/src/gui/preferences.cpp
+++ b/src/gui/preferences.cpp
@@ -433,13 +433,9 @@ static void
 gm_pw_init_general_page (GtkWidget *prefs_window,
                          GtkWidget *container)
 {
-  GmPreferencesWindow *pw = NULL;
-
   GtkWidget *subsection = NULL;
   GtkWidget *entry = NULL;
 
-  pw = gm_pw_get_pw (prefs_window);
-
   /* Personal Information */
   subsection = gnome_prefs_subsection_new (prefs_window, container,
                                 _("Personal Information"), 2, 2);
@@ -686,8 +682,6 @@ static void
 gm_pw_init_sip_page (GtkWidget *prefs_window,
                      GtkWidget *container)
 {
-  GmPreferencesWindow *pw = NULL;
-
   GtkWidget *entry = NULL;
   GtkWidget *subsection = NULL;
 
@@ -698,8 +692,6 @@ gm_pw_init_sip_page (GtkWidget *prefs_window,
       NULL
     };
 
-  pw = gm_pw_get_pw (prefs_window);
-
   /* Add Misc Settings */
   subsection = gnome_prefs_subsection_new (prefs_window, container,
                                            _("Misc Settings"), 2, 2);
@@ -723,13 +715,10 @@ static void
 gm_pw_init_audio_devices_page (GtkWidget *prefs_window,
                                GtkWidget *container)
 {
-  GmPreferencesWindow *pw = NULL;
-
   GtkWidget *subsection = NULL;
-
   PStringArray devs;
-
   gchar **array = NULL;
+  GmPreferencesWindow *pw = NULL;
 
   pw = gm_pw_get_pw (prefs_window);
 
@@ -919,10 +908,6 @@ gm_pw_init_audio_codecs_page (GtkWidget *prefs_window,
   GtkWidget *subsection = NULL;
   GtkWidget *codecs_list = NULL;
 
-  GmPreferencesWindow *pw = NULL;
-
-  pw = gm_pw_get_pw (prefs_window);
-
   /* Packing widgets */
   subsection = gnome_prefs_subsection_new (prefs_window, container,
 				_("Codecs"), 1, 1);
@@ -956,10 +941,6 @@ gm_pw_init_video_codecs_page (GtkWidget *prefs_window,
   GtkWidget *subsection = NULL;
   GtkWidget *codecs_list = NULL;
 
-  GmPreferencesWindow *pw = NULL;
-
-  pw = gm_pw_get_pw (prefs_window);
-
   /* Packing widgets */
   subsection = gnome_prefs_subsection_new (prefs_window, container,
 				_("Codecs"), 1, 1);
diff --git a/src/gui/statusmenu.cpp b/src/gui/statusmenu.cpp
index f50c931..5a70d52 100644
--- a/src/gui/statusmenu.cpp
+++ b/src/gui/statusmenu.cpp
@@ -510,11 +510,9 @@ status_menu_clear_status_message_dialog_run (StatusMenu *self)
   int response = 0;
   int i = 0;
   gchar *message = NULL;
-  gchar *presence = NULL;
   gchar *status = NULL;
 
   // Current status
-  presence = gm_conf_get_string (PERSONAL_DATA_KEY "short_status");
   status = gm_conf_get_string (PERSONAL_DATA_KEY "long_status");
 
   // Build the dialog



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