[gnome-control-center] all: make GCC stop complaining about set but unused variables



commit 0132e4be37b9200c337c7a988f0dfdabc2a9820f
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Feb 4 15:43:40 2011 -0500

    all: make GCC stop complaining about set but unused variables

 panels/sound/gvc-mixer-event-role.c        |   19 ----------------
 panels/sound/gvc-mixer-sink-input.c        |   33 ----------------------------
 panels/sound/gvc-mixer-sink.c              |   31 --------------------------
 panels/sound/gvc-mixer-source-output.c     |   16 -------------
 panels/sound/gvc-mixer-source.c            |   31 --------------------------
 panels/sound/gvc-sound-theme-chooser.c     |   16 +------------
 panels/user-accounts/fingerprint-strings.h |    2 +-
 panels/user-accounts/um-language-dialog.c  |    2 -
 panels/user-accounts/um-user-panel.c       |    4 +--
 panels/user-accounts/um-utils.c            |    2 -
 10 files changed, 3 insertions(+), 153 deletions(-)
---
diff --git a/panels/sound/gvc-mixer-event-role.c b/panels/sound/gvc-mixer-event-role.c
index 7eb3d00..5a28767 100644
--- a/panels/sound/gvc-mixer-event-role.c
+++ b/panels/sound/gvc-mixer-event-role.c
@@ -59,13 +59,10 @@ update_settings (GvcMixerEventRole *role,
                  gpointer          *op)
 {
         pa_operation              *o;
-        guint                      index;
         const GvcChannelMap       *map;
         pa_context                *context;
         pa_ext_stream_restore_info info;
 
-        index = gvc_mixer_stream_get_index (GVC_MIXER_STREAM (role));
-
         map = gvc_mixer_stream_get_channel_map (GVC_MIXER_STREAM(role));
 
         info.volume = *gvc_channel_map_get_cvolume(map);
@@ -159,28 +156,12 @@ gvc_mixer_event_role_get_property (GObject     *object,
         }
 }
 
-static GObject *
-gvc_mixer_event_role_constructor (GType                  type,
-                                  guint                  n_construct_properties,
-                                  GObjectConstructParam *construct_params)
-{
-        GObject       *object;
-        GvcMixerEventRole *self;
-
-        object = G_OBJECT_CLASS (gvc_mixer_event_role_parent_class)->constructor (type, n_construct_properties, construct_params);
-
-        self = GVC_MIXER_EVENT_ROLE (object);
-
-        return object;
-}
-
 static void
 gvc_mixer_event_role_class_init (GvcMixerEventRoleClass *klass)
 {
         GObjectClass        *object_class = G_OBJECT_CLASS (klass);
         GvcMixerStreamClass *stream_class = GVC_MIXER_STREAM_CLASS (klass);
 
-        object_class->constructor = gvc_mixer_event_role_constructor;
         object_class->finalize = gvc_mixer_event_role_finalize;
         object_class->set_property = gvc_mixer_event_role_set_property;
         object_class->get_property = gvc_mixer_event_role_get_property;
diff --git a/panels/sound/gvc-mixer-sink-input.c b/panels/sound/gvc-mixer-sink-input.c
index 9429eca..03ba3b2 100644
--- a/panels/sound/gvc-mixer-sink-input.c
+++ b/panels/sound/gvc-mixer-sink-input.c
@@ -43,7 +43,6 @@ struct GvcMixerSinkInputPrivate
 static void     gvc_mixer_sink_input_class_init (GvcMixerSinkInputClass *klass);
 static void     gvc_mixer_sink_input_init       (GvcMixerSinkInput      *mixer_sink_input);
 static void     gvc_mixer_sink_input_finalize   (GObject                *object);
-static void     gvc_mixer_sink_input_dispose    (GObject                *object);
 
 G_DEFINE_TYPE (GvcMixerSinkInput, gvc_mixer_sink_input, GVC_TYPE_MIXER_STREAM)
 
@@ -55,12 +54,10 @@ gvc_mixer_sink_input_push_volume (GvcMixerStream *stream, gpointer *op)
         const GvcChannelMap *map;
         pa_context          *context;
         const pa_cvolume    *cv;
-        guint                num_channels;
 
         index = gvc_mixer_stream_get_index (stream);
 
         map = gvc_mixer_stream_get_channel_map (stream);
-        num_channels = gvc_channel_map_get_num_channels (map);
 
         cv = gvc_channel_map_get_cvolume(map);
 
@@ -109,29 +106,12 @@ gvc_mixer_sink_input_change_is_muted (GvcMixerStream *stream,
         return TRUE;
 }
 
-static GObject *
-gvc_mixer_sink_input_constructor (GType                  type,
-                                  guint                  n_construct_properties,
-                                  GObjectConstructParam *construct_params)
-{
-        GObject       *object;
-        GvcMixerSinkInput *self;
-
-        object = G_OBJECT_CLASS (gvc_mixer_sink_input_parent_class)->constructor (type, n_construct_properties, construct_params);
-
-        self = GVC_MIXER_SINK_INPUT (object);
-
-        return object;
-}
-
 static void
 gvc_mixer_sink_input_class_init (GvcMixerSinkInputClass *klass)
 {
         GObjectClass        *object_class = G_OBJECT_CLASS (klass);
         GvcMixerStreamClass *stream_class = GVC_MIXER_STREAM_CLASS (klass);
 
-        object_class->constructor = gvc_mixer_sink_input_constructor;
-        object_class->dispose = gvc_mixer_sink_input_dispose;
         object_class->finalize = gvc_mixer_sink_input_finalize;
 
         stream_class->push_volume = gvc_mixer_sink_input_push_volume;
@@ -147,19 +127,6 @@ gvc_mixer_sink_input_init (GvcMixerSinkInput *sink_input)
 }
 
 static void
-gvc_mixer_sink_input_dispose (GObject *object)
-{
-        GvcMixerSinkInput *mixer_sink_input;
-
-        g_return_if_fail (object != NULL);
-        g_return_if_fail (GVC_IS_MIXER_SINK_INPUT (object));
-
-        mixer_sink_input = GVC_MIXER_SINK_INPUT (object);
-
-        G_OBJECT_CLASS (gvc_mixer_sink_input_parent_class)->dispose (object);
-}
-
-static void
 gvc_mixer_sink_input_finalize (GObject *object)
 {
         GvcMixerSinkInput *mixer_sink_input;
diff --git a/panels/sound/gvc-mixer-sink.c b/panels/sound/gvc-mixer-sink.c
index 30fceac..a6f1493 100644
--- a/panels/sound/gvc-mixer-sink.c
+++ b/panels/sound/gvc-mixer-sink.c
@@ -43,7 +43,6 @@ struct GvcMixerSinkPrivate
 static void     gvc_mixer_sink_class_init (GvcMixerSinkClass *klass);
 static void     gvc_mixer_sink_init       (GvcMixerSink      *mixer_sink);
 static void     gvc_mixer_sink_finalize   (GObject           *object);
-static void     gvc_mixer_sink_dispose    (GObject           *object);
 
 G_DEFINE_TYPE (GvcMixerSink, gvc_mixer_sink, GVC_TYPE_MIXER_STREAM)
 
@@ -139,29 +138,12 @@ gvc_mixer_sink_change_port (GvcMixerStream *stream,
 #endif /* PA_MICRO > 15 */
 }
 
-static GObject *
-gvc_mixer_sink_constructor (GType                  type,
-                            guint                  n_construct_properties,
-                            GObjectConstructParam *construct_params)
-{
-        GObject      *object;
-        GvcMixerSink *self;
-
-        object = G_OBJECT_CLASS (gvc_mixer_sink_parent_class)->constructor (type, n_construct_properties, construct_params);
-
-        self = GVC_MIXER_SINK (object);
-
-        return object;
-}
-
 static void
 gvc_mixer_sink_class_init (GvcMixerSinkClass *klass)
 {
         GObjectClass        *object_class = G_OBJECT_CLASS (klass);
         GvcMixerStreamClass *stream_class = GVC_MIXER_STREAM_CLASS (klass);
 
-        object_class->constructor = gvc_mixer_sink_constructor;
-        object_class->dispose = gvc_mixer_sink_dispose;
         object_class->finalize = gvc_mixer_sink_finalize;
 
         stream_class->push_volume = gvc_mixer_sink_push_volume;
@@ -178,19 +160,6 @@ gvc_mixer_sink_init (GvcMixerSink *sink)
 }
 
 static void
-gvc_mixer_sink_dispose (GObject *object)
-{
-        GvcMixerSink *mixer_sink;
-
-        g_return_if_fail (object != NULL);
-        g_return_if_fail (GVC_IS_MIXER_SINK (object));
-
-        mixer_sink = GVC_MIXER_SINK (object);
-
-        G_OBJECT_CLASS (gvc_mixer_sink_parent_class)->dispose (object);
-}
-
-static void
 gvc_mixer_sink_finalize (GObject *object)
 {
         GvcMixerSink *mixer_sink;
diff --git a/panels/sound/gvc-mixer-source-output.c b/panels/sound/gvc-mixer-source-output.c
index 636fc2e..536487b 100644
--- a/panels/sound/gvc-mixer-source-output.c
+++ b/panels/sound/gvc-mixer-source-output.c
@@ -60,28 +60,12 @@ gvc_mixer_source_output_change_is_muted (GvcMixerStream *stream,
         return TRUE;
 }
 
-static GObject *
-gvc_mixer_source_output_constructor (GType                  type,
-                                  guint                  n_construct_properties,
-                                  GObjectConstructParam *construct_params)
-{
-        GObject       *object;
-        GvcMixerSourceOutput *self;
-
-        object = G_OBJECT_CLASS (gvc_mixer_source_output_parent_class)->constructor (type, n_construct_properties, construct_params);
-
-        self = GVC_MIXER_SOURCE_OUTPUT (object);
-
-        return object;
-}
-
 static void
 gvc_mixer_source_output_class_init (GvcMixerSourceOutputClass *klass)
 {
         GObjectClass        *object_class = G_OBJECT_CLASS (klass);
         GvcMixerStreamClass *stream_class = GVC_MIXER_STREAM_CLASS (klass);
 
-        object_class->constructor = gvc_mixer_source_output_constructor;
         object_class->finalize = gvc_mixer_source_output_finalize;
 
         stream_class->push_volume = gvc_mixer_source_output_push_volume;
diff --git a/panels/sound/gvc-mixer-source.c b/panels/sound/gvc-mixer-source.c
index 46d6403..ebb05a6 100644
--- a/panels/sound/gvc-mixer-source.c
+++ b/panels/sound/gvc-mixer-source.c
@@ -43,7 +43,6 @@ struct GvcMixerSourcePrivate
 static void     gvc_mixer_source_class_init (GvcMixerSourceClass *klass);
 static void     gvc_mixer_source_init       (GvcMixerSource      *mixer_source);
 static void     gvc_mixer_source_finalize   (GObject            *object);
-static void     gvc_mixer_source_dispose    (GObject           *object);
 
 G_DEFINE_TYPE (GvcMixerSource, gvc_mixer_source, GVC_TYPE_MIXER_STREAM)
 
@@ -139,29 +138,12 @@ gvc_mixer_source_change_port (GvcMixerStream *stream,
 #endif /* PA_MICRO > 15 */
 }
 
-static GObject *
-gvc_mixer_source_constructor (GType                  type,
-                            guint                  n_construct_properties,
-                            GObjectConstructParam *construct_params)
-{
-        GObject        *object;
-        GvcMixerSource *self;
-
-        object = G_OBJECT_CLASS (gvc_mixer_source_parent_class)->constructor (type, n_construct_properties, construct_params);
-
-        self = GVC_MIXER_SOURCE (object);
-
-        return object;
-}
-
 static void
 gvc_mixer_source_class_init (GvcMixerSourceClass *klass)
 {
         GObjectClass        *object_class = G_OBJECT_CLASS (klass);
         GvcMixerStreamClass *stream_class = GVC_MIXER_STREAM_CLASS (klass);
 
-        object_class->constructor = gvc_mixer_source_constructor;
-        object_class->dispose = gvc_mixer_source_dispose;
         object_class->finalize = gvc_mixer_source_finalize;
 
         stream_class->push_volume = gvc_mixer_source_push_volume;
@@ -178,19 +160,6 @@ gvc_mixer_source_init (GvcMixerSource *source)
 }
 
 static void
-gvc_mixer_source_dispose (GObject *object)
-{
-        GvcMixerSource *mixer_source;
-
-        g_return_if_fail (object != NULL);
-        g_return_if_fail (GVC_IS_MIXER_SOURCE (object));
-
-        mixer_source = GVC_MIXER_SOURCE (object);
-
-        G_OBJECT_CLASS (gvc_mixer_source_parent_class)->dispose (object);
-}
-
-static void
 gvc_mixer_source_finalize (GObject *object)
 {
         GvcMixerSource *mixer_source;
diff --git a/panels/sound/gvc-sound-theme-chooser.c b/panels/sound/gvc-sound-theme-chooser.c
index ca636dc..de0ad7b 100644
--- a/panels/sound/gvc-sound-theme-chooser.c
+++ b/panels/sound/gvc-sound-theme-chooser.c
@@ -98,7 +98,7 @@ enum {
 static xmlChar *
 xml_get_and_trim_names (xmlNodePtr node)
 {
-        xmlNodePtr cur, keep = NULL;
+        xmlNodePtr cur;
         xmlChar *keep_lang = NULL;
         xmlChar *value;
         int j, keep_pri = INT_MAX;
@@ -135,7 +135,6 @@ xml_get_and_trim_names (xmlNodePtr node)
 
                                 keep_lang = cur_lang;
                                 keep_pri = cur_pri;
-                                keep = cur;
                         } else {
                                 if (cur_lang)
                                         xmlFree (cur_lang);
@@ -336,7 +335,6 @@ load_theme_file (const char *path,
                  char      **parent)
 {
         GKeyFile *file;
-        char *indexname = NULL;
         gboolean hidden;
 
         file = g_key_file_new ();
@@ -347,12 +345,6 @@ load_theme_file (const char *path,
         /* Don't add hidden themes to the list */
         hidden = g_key_file_get_boolean (file, "Sound Theme", "Hidden", NULL);
         if (!hidden) {
-                indexname = g_key_file_get_locale_string (file,
-                                                          "Sound Theme",
-                                                          "Name",
-                                                          NULL,
-                                                          NULL);
-
                 /* Save the parent theme, if there's one */
                 if (parent != NULL) {
                         *parent = g_key_file_get_string (file,
@@ -663,12 +655,8 @@ static void
 update_theme (GvcSoundThemeChooser *chooser)
 {
         gboolean     events_enabled;
-        gboolean     bell_enabled;
         char        *last_theme;
 
-        bell_enabled = gconf_client_get_bool (chooser->priv->client, AUDIO_BELL_KEY, NULL);
-        //set_audible_bell_enabled (chooser, bell_enabled);
-
         events_enabled = gconf_client_get_bool (chooser->priv->client, EVENT_SOUNDS_KEY, NULL);
 
         last_theme = chooser->priv->current_theme;
@@ -725,7 +713,6 @@ on_key_changed (GConfClient          *client,
                 GvcSoundThemeChooser *chooser)
 {
         const char *key;
-        GConfValue *value;
 
         key = gconf_entry_get_key (entry);
 
@@ -734,7 +721,6 @@ on_key_changed (GConfClient          *client,
                 return;
         }
 
-        value = gconf_entry_get_value (entry);
         if (strcmp (key, EVENT_SOUNDS_KEY) == 0) {
                 update_theme (chooser);
         } else if (strcmp (key, SOUND_THEME_KEY) == 0) {
diff --git a/panels/user-accounts/fingerprint-strings.h b/panels/user-accounts/fingerprint-strings.h
index 6fb7cb3..f122d3a 100644
--- a/panels/user-accounts/fingerprint-strings.h
+++ b/panels/user-accounts/fingerprint-strings.h
@@ -62,7 +62,7 @@ static const char *finger_str_to_msg(const char *finger_name, gboolean is_swipe)
  * verify-match
  * verify-unknown-error
  */
-static const char *verify_result_str_to_msg(const char *result, gboolean is_swipe)
+G_GNUC_UNUSED static const char *verify_result_str_to_msg(const char *result, gboolean is_swipe)
 {
 	if (result == NULL)
 		return NULL;
diff --git a/panels/user-accounts/um-language-dialog.c b/panels/user-accounts/um-language-dialog.c
index 281cdfc..41acc24 100644
--- a/panels/user-accounts/um-language-dialog.c
+++ b/panels/user-accounts/um-language-dialog.c
@@ -232,7 +232,6 @@ um_language_chooser_new (GtkWidget *parent)
         GtkWidget *chooser;
         GtkWidget *list;
         GtkWidget *button;
-        GtkTreeModel *model;
         GHashTable *user_langs;
         GdkCursor *cursor;
         guint timeout;
@@ -261,7 +260,6 @@ um_language_chooser_new (GtkWidget *parent)
 	/* Add user languages */
 	user_langs = new_ht_for_user_languages ();
         cc_common_language_setup_list (list, user_langs);
-        model = gtk_tree_view_get_model (GTK_TREE_VIEW (list));
 
 	/* Setup so that the list is added after the dialogue is shown */
         cursor = gdk_cursor_new (GDK_WATCH);
diff --git a/panels/user-accounts/um-user-panel.c b/panels/user-accounts/um-user-panel.c
index 6121b09..cb432ba 100644
--- a/panels/user-accounts/um-user-panel.c
+++ b/panels/user-accounts/um-user-panel.c
@@ -101,14 +101,12 @@ static UmUser *
 get_selected_user (UmUserPanelPrivate *d)
 {
         GtkTreeView *tv;
-        GtkListStore *store;
         GtkTreeIter iter;
         GtkTreeSelection *selection;
         GtkTreeModel *model;
         UmUser *user;
 
         tv = (GtkTreeView *)get_widget (d, "list-treeview");
-        store = (GtkListStore *)gtk_tree_view_get_model (tv);
         selection = gtk_tree_view_get_selection (tv);
 
         if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
@@ -1204,7 +1202,7 @@ um_user_panel_init (UmUserPanel *self)
 {
         UmUserPanelPrivate *d;
         GError *error;
-        volatile GType type;
+        volatile GType type G_GNUC_UNUSED;
         const gchar *filename;
         GtkWidget *button;
         GtkStyleContext *context;
diff --git a/panels/user-accounts/um-utils.c b/panels/user-accounts/um-utils.c
index b489bb6..4e4aa51 100644
--- a/panels/user-accounts/um-utils.c
+++ b/panels/user-accounts/um-utils.c
@@ -77,13 +77,11 @@ icon_shape_renderer (cairo_t        *cr,
         if (GPOINTER_TO_UINT (attr->data) == data->placeholder) {
                 gdouble ascent;
                 gdouble height;
-                gdouble width;
                 GdkPixbuf *pixbuf;
                 GtkIconInfo *info;
 
                 ascent = pango_units_to_double (attr->ink_rect.y);
                 height = pango_units_to_double (attr->ink_rect.height);
-                width = pango_units_to_double (attr->ink_rect.width);
                 info = gtk_icon_theme_lookup_by_gicon (gtk_icon_theme_get_default (),
                                                        data->icon,
                                                        (gint)height,



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