[aisleriot] Fix unused-but-set-variable warnings
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] Fix unused-but-set-variable warnings
- Date: Mon, 21 Nov 2011 13:41:33 +0000 (UTC)
commit 81f9b082377ddee30555d453cda728e388a64bd6
Author: Christian Persch <chpe gnome org>
Date: Mon Nov 21 13:30:13 2011 +0100
Fix unused-but-set-variable warnings
src/ar-game-chooser.c | 2 --
src/board-noclutter.c | 3 +--
src/board.c | 6 +-----
src/card.c | 4 +---
src/slot-renderer.c | 2 --
src/window.c | 3 +--
6 files changed, 4 insertions(+), 16 deletions(-)
---
diff --git a/src/ar-game-chooser.c b/src/ar-game-chooser.c
index 8333523..c9abad9 100644
--- a/src/ar-game-chooser.c
+++ b/src/ar-game-chooser.c
@@ -118,7 +118,6 @@ ar_game_chooser_constructor (GType type,
GObject *object;
ArGameChooser *chooser;
ArGameChooserPrivate *priv;
- GtkWidget *widget;
GtkWindow *window;
GtkListStore *list;
GtkWidget *list_view;
@@ -138,7 +137,6 @@ ar_game_chooser_constructor (GType type,
object = G_OBJECT_CLASS (ar_game_chooser_parent_class)->constructor
(type, n_construct_properties, construct_params);
- widget = GTK_WIDGET (object);
window = GTK_WINDOW (object);
chooser = AR_GAME_CHOOSER (object);
priv = chooser->priv;
diff --git a/src/board-noclutter.c b/src/board-noclutter.c
index 9e538fa..25c2a75 100644
--- a/src/board-noclutter.c
+++ b/src/board-noclutter.c
@@ -758,7 +758,6 @@ aisleriot_board_setup_geometry (AisleriotBoard *board)
GPtrArray *slots;
guint i, n_slots;
CardSize card_size;
- gboolean size_changed;
ArCardTheme *theme;
/* Nothing to do yet */
@@ -775,7 +774,7 @@ aisleriot_board_setup_geometry (AisleriotBoard *board)
if (theme == NULL)
return;
- size_changed = ar_card_theme_set_size (theme,
+ ar_card_theme_set_size (theme,
priv->xslotstep,
priv->yslotstep,
priv->card_slot_ratio);
diff --git a/src/board.c b/src/board.c
index f68d06e..4376bc4 100644
--- a/src/board.c
+++ b/src/board.c
@@ -1044,7 +1044,7 @@ drag_begin (AisleriotBoard *board)
{
AisleriotBoardPrivate *priv = board->priv;
ArSlot *hslot;
- int delta, height, width;
+ int delta;
int x, y;
int num_moving_cards;
guint i;
@@ -1090,8 +1090,6 @@ drag_begin (AisleriotBoard *board)
cards->data + priv->moving_cards_origin_card_id,
cards->len - priv->moving_cards_origin_card_id);
- width = priv->card_size.width + (num_moving_cards - 1) * hslot->pixeldx;
- height = priv->card_size.height + (num_moving_cards - 1) * hslot->pixeldy;
priv->moving_cards_group = g_object_ref_sink (clutter_group_new ());
clutter_actor_set_position (priv->moving_cards_group, x, y);
@@ -1101,8 +1099,6 @@ drag_begin (AisleriotBoard *board)
* does allow that.)
*/
x = y = 0;
- width = priv->card_size.width;
- height = priv->card_size.height;
for (i = 0; i < priv->moving_cards->len; ++i) {
Card hcard = CARD (priv->moving_cards->data[i]);
diff --git a/src/card.c b/src/card.c
index 55b6994..664bdbc 100644
--- a/src/card.c
+++ b/src/card.c
@@ -118,9 +118,7 @@ aisleriot_card_class_init (AisleriotCardClass *klass)
static void
aisleriot_card_init (AisleriotCard *self)
{
- AisleriotCardPrivate *priv;
-
- priv = self->priv = AISLERIOT_CARD_GET_PRIVATE (self);
+ self->priv = AISLERIOT_CARD_GET_PRIVATE (self);
}
static void
diff --git a/src/slot-renderer.c b/src/slot-renderer.c
index 1153098..93bdd3b 100644
--- a/src/slot-renderer.c
+++ b/src/slot-renderer.c
@@ -428,13 +428,11 @@ aisleriot_slot_renderer_paint (ClutterActor *actor)
AisleriotSlotRenderer *srend = (AisleriotSlotRenderer *) actor;
AisleriotSlotRendererPrivate *priv = srend->priv;
guint n_cards, n_animated_cards;
- guint8 *cards;
guint i;
g_return_if_fail (priv->cache != NULL);
g_return_if_fail (priv->slot != NULL);
- cards = priv->slot->cards->data;
n_cards = priv->slot->cards->len;
n_animated_cards = priv->animations->len + priv->n_unexposed_animated_cards;
diff --git a/src/window.c b/src/window.c
index fd698c6..061eb0e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1968,10 +1968,9 @@ aisleriot_window_state_event (GtkWidget *widget,
AisleriotWindowPrivate *priv = window->priv;
if (event->changed_mask & (GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_MAXIMIZED)) {
- gboolean is_fullscreen, is_maximised;
+ gboolean is_fullscreen;
is_fullscreen = (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) != 0;
- is_maximised = (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
set_fullscreen_actions (window, is_fullscreen);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]