From 13edecde6ce0af6a67fde98a9d9a06aa9341f018 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 24 Jan 2011 12:41:23 -0500 Subject: [PATCH] Remove set-but-unused variables, to appease gcc 4.6 https://bugzilla.gnome.org/show_bug.cgi?id=640447 --- src/gdmuser/gdm-user-manager.c | 13 ++----------- src/gdmuser/gdm-user.c | 4 ---- src/gvc/gvc-mixer-event-role.c | 6 ------ src/gvc/gvc-mixer-sink-input.c | 9 --------- src/gvc/gvc-mixer-sink.c | 7 ------- src/gvc/gvc-mixer-source-output.c | 3 --- src/gvc/gvc-mixer-source.c | 7 ------- src/shell-app-system.c | 2 -- src/shell-global.c | 3 +-- src/shell-window-tracker.c | 3 --- src/st/st-overflow-box.c | 3 +-- src/st/st-scroll-bar.c | 2 -- src/st/st-table.c | 9 +++------ src/st/st-widget.c | 3 --- 14 files changed, 7 insertions(+), 67 deletions(-) diff --git a/src/gdmuser/gdm-user-manager.c b/src/gdmuser/gdm-user-manager.c index a39bea1ca..eba9da11e 100644 --- a/src/gdmuser/gdm-user-manager.c +++ b/src/gdmuser/gdm-user-manager.c @@ -1020,13 +1020,10 @@ on_get_unix_user_finished (DBusGProxy *proxy, DBusGProxyCall *call, GdmUserManagerNewSession *new_session) { - GdmUserManager *manager; GError *error; guint uid; gboolean res; - manager = new_session->manager; - g_assert (new_session->get_unix_user_call == call); error = NULL; @@ -1550,11 +1547,9 @@ static void get_accounts_proxy (GdmUserManager *manager) { DBusGProxy *proxy; - GError *error; g_assert (manager->priv->accounts_proxy == NULL); - error = NULL; proxy = dbus_g_proxy_new_for_name (manager->priv->connection, ACCOUNTS_NAME, ACCOUNTS_PATH, @@ -2554,8 +2549,6 @@ reload_shells (GdmUserManager *manager) static void load_users_manually (GdmUserManager *manager) { - gboolean res; - manager->priv->shells = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, @@ -2564,7 +2557,7 @@ load_users_manually (GdmUserManager *manager) load_sessions (manager); - res = load_ck_history (manager); + load_ck_history (manager); schedule_reload_passwd (manager); } @@ -2605,10 +2598,8 @@ load_seat_incrementally (GdmUserManager *manager) } if (manager->priv->seat.state == GDM_USER_MANAGER_SEAT_STATE_LOADED) { - gboolean res; - load_sessions (manager); - res = load_ck_history (manager); + load_ck_history (manager); } maybe_set_is_loaded (manager); diff --git a/src/gdmuser/gdm-user.c b/src/gdmuser/gdm-user.c index 710510a44..735c2cb74 100644 --- a/src/gdmuser/gdm-user.c +++ b/src/gdmuser/gdm-user.c @@ -151,10 +151,6 @@ gdm_user_set_property (GObject *object, const GValue *value, GParamSpec *pspec) { - GdmUser *user; - - user = GDM_USER (object); - switch (prop_id) { default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); diff --git a/src/gvc/gvc-mixer-event-role.c b/src/gvc/gvc-mixer-event-role.c index 7eb3d00d7..071722e48 100644 --- a/src/gvc/gvc-mixer-event-role.c +++ b/src/gvc/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); @@ -165,12 +162,9 @@ gvc_mixer_event_role_constructor (GType type, 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; } diff --git a/src/gvc/gvc-mixer-sink-input.c b/src/gvc/gvc-mixer-sink-input.c index 9429eca0a..5cd665c9c 100644 --- a/src/gvc/gvc-mixer-sink-input.c +++ b/src/gvc/gvc-mixer-sink-input.c @@ -55,12 +55,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); @@ -115,12 +113,9 @@ gvc_mixer_sink_input_constructor (GType type, 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; } @@ -149,13 +144,9 @@ 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); } diff --git a/src/gvc/gvc-mixer-sink.c b/src/gvc/gvc-mixer-sink.c index 30fceac4d..5b74a5ec6 100644 --- a/src/gvc/gvc-mixer-sink.c +++ b/src/gvc/gvc-mixer-sink.c @@ -145,12 +145,9 @@ gvc_mixer_sink_constructor (GType type, 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; } @@ -180,13 +177,9 @@ 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); } diff --git a/src/gvc/gvc-mixer-source-output.c b/src/gvc/gvc-mixer-source-output.c index 636fc2ea7..8d76763bb 100644 --- a/src/gvc/gvc-mixer-source-output.c +++ b/src/gvc/gvc-mixer-source-output.c @@ -66,12 +66,9 @@ gvc_mixer_source_output_constructor (GType type, 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; } diff --git a/src/gvc/gvc-mixer-source.c b/src/gvc/gvc-mixer-source.c index 46d640380..6fed25e7b 100644 --- a/src/gvc/gvc-mixer-source.c +++ b/src/gvc/gvc-mixer-source.c @@ -145,12 +145,9 @@ gvc_mixer_source_constructor (GType type, 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; } @@ -180,13 +177,9 @@ 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); } diff --git a/src/shell-app-system.c b/src/shell-app-system.c index daf0f14cc..0cf0bbb8b 100644 --- a/src/shell-app-system.c +++ b/src/shell-app-system.c @@ -1317,7 +1317,6 @@ shell_app_info_launch_full (ShellAppInfo *info, gboolean ret; ShellGlobal *global; MetaScreen *screen; - MetaDisplay *display; if (startup_id) *startup_id = NULL; @@ -1353,7 +1352,6 @@ shell_app_info_launch_full (ShellAppInfo *info, global = shell_global_get (); screen = shell_global_get_screen (global); - display = meta_screen_get_display (screen); if (timestamp == 0) timestamp = clutter_get_current_event_time (); diff --git a/src/shell-global.c b/src/shell-global.c index 8e0463ddd..68ee6190c 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -885,7 +885,6 @@ shell_global_add_extension_importer (ShellGlobal *global, GError **error) { jsval target_object; - JSObject *importer; JSContext *context = gjs_context_get_native_context (global->js_context); char *search_path[2] = { 0, 0 }; @@ -920,7 +919,7 @@ shell_global_add_extension_importer (ShellGlobal *global, } search_path[0] = (char*)directory; - importer = gjs_define_importer (context, JSVAL_TO_OBJECT (target_object), target_property, (const char **)search_path, FALSE); + gjs_define_importer (context, JSVAL_TO_OBJECT (target_object), target_property, (const char **)search_path, FALSE); JS_EndRequest (context); return TRUE; out_error: diff --git a/src/shell-window-tracker.c b/src/shell-window-tracker.c index 1e61b7c6d..c2ff93281 100644 --- a/src/shell-window-tracker.c +++ b/src/shell-window-tracker.c @@ -825,12 +825,9 @@ on_focus_window_changed (MetaDisplay *display, GParamSpec *spec, ShellWindowTracker *tracker) { - MetaScreen *screen; MetaWindow *new_focus_win; ShellApp *new_focus_app; - screen = shell_global_get_screen (shell_global_get ()); - new_focus_win = meta_display_get_focus_window (display); new_focus_app = new_focus_win ? g_hash_table_lookup (tracker->window_to_app, new_focus_win) : NULL; diff --git a/src/st/st-overflow-box.c b/src/st/st-overflow-box.c index 9996b2a18..643a0e968 100644 --- a/src/st/st-overflow-box.c +++ b/src/st/st-overflow-box.c @@ -250,7 +250,7 @@ st_overflow_box_allocate (ClutterActor *actor, StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor)); ClutterActorBox content_box; gfloat position; - float avail_width, avail_height; + float avail_width; GList *l, *children; int i; gboolean done_non_fixed; @@ -265,7 +265,6 @@ st_overflow_box_allocate (ClutterActor *actor, st_theme_node_get_content_box (theme_node, box, &content_box); avail_width = content_box.x2 - content_box.x1; - avail_height = content_box.y2 - content_box.y1; position = content_box.y1; priv->n_visible = 0; diff --git a/src/st/st-scroll-bar.c b/src/st/st-scroll-bar.c index 61acdf06e..46c974d9c 100644 --- a/src/st/st-scroll-bar.c +++ b/src/st/st-scroll-bar.c @@ -643,13 +643,11 @@ st_scroll_bar_constructor (GType type, GObjectClass *gobject_class; GObject *obj; StScrollBar *bar; - StScrollBarPrivate *priv; gobject_class = G_OBJECT_CLASS (st_scroll_bar_parent_class); obj = gobject_class->constructor (type, n_properties, properties); bar = ST_SCROLL_BAR (obj); - priv = ST_SCROLL_BAR_GET_PRIVATE (bar); g_signal_connect (bar, "notify::reactive", G_CALLBACK (bar_reactive_notify_cb), NULL); diff --git a/src/st/st-table.c b/src/st/st-table.c index 26fb42ed0..b736a5426 100644 --- a/src/st/st-table.c +++ b/src/st/st-table.c @@ -315,12 +315,12 @@ st_table_calculate_col_widths (StTable *table, for (list = children; list; list = list->next) { - gint row, col; + gint col; gfloat w_min, w_pref; gboolean x_expand; StTableChild *meta; ClutterActor *child; - gint col_span, row_span; + gint col_span; child = CLUTTER_ACTOR (list->data); @@ -331,10 +331,8 @@ st_table_calculate_col_widths (StTable *table, /* get child properties */ col = meta->col; - row = meta->row; x_expand = meta->x_expand; col_span = meta->col_span; - row_span = meta->row_span; if (x_expand) is_expand_col[col] = TRUE; @@ -428,7 +426,7 @@ st_table_calculate_row_heights (StTable *table, { gint row, col, cell_width; gfloat h_min, h_pref; - gboolean x_expand, y_expand; + gboolean y_expand; StTableChild *meta; ClutterActor *child; gint col_span, row_span; @@ -443,7 +441,6 @@ st_table_calculate_row_heights (StTable *table, /* get child properties */ col = meta->col; row = meta->row; - x_expand = meta->x_expand; y_expand = meta->y_expand; col_span = meta->col_span; row_span = meta->row_span; diff --git a/src/st/st-widget.c b/src/st/st-widget.c index 71c1518f8..09b282413 100644 --- a/src/st/st-widget.c +++ b/src/st/st-widget.c @@ -357,13 +357,10 @@ st_widget_allocate (ClutterActor *actor, { StWidget *self = ST_WIDGET (actor); StWidgetPrivate *priv = self->priv; - StThemeNode *theme_node; ClutterActorClass *klass; ClutterGeometry area; ClutterVertex in_v, out_v; - theme_node = st_widget_get_theme_node (self); - klass = CLUTTER_ACTOR_CLASS (st_widget_parent_class); klass->allocate (actor, box, flags);