aboutsummaryrefslogtreecommitdiffstats
path: root/libgnomecanvas
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2011-02-09 00:57:50 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-02-09 00:57:50 +0800
commit2c31a5bc23cf5a092c0621bf34554ffb2b6ae2ec (patch)
treee311c2818c68f66126ee6879abd4a080b4b7ad6f /libgnomecanvas
parenteef8eda70ed8f716eeaae7dd8d9c81640b0dd4f8 (diff)
downloadgsoc2013-evolution-2c31a5bc23cf5a092c0621bf34554ffb2b6ae2ec.tar.gz
gsoc2013-evolution-2c31a5bc23cf5a092c0621bf34554ffb2b6ae2ec.tar.zst
gsoc2013-evolution-2c31a5bc23cf5a092c0621bf34554ffb2b6ae2ec.zip
Bug 641756 - Fix warnings from GCC 4.6
GCC learned how to find dead assignments.
Diffstat (limited to 'libgnomecanvas')
-rw-r--r--libgnomecanvas/gnome-canvas-pixbuf.c11
-rw-r--r--libgnomecanvas/gnome-canvas-rect.c3
-rw-r--r--libgnomecanvas/gnome-canvas-rich-text.c6
-rw-r--r--libgnomecanvas/gnome-canvas.c2
4 files changed, 3 insertions, 19 deletions
diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c
index 3565610b47..3d4657a560 100644
--- a/libgnomecanvas/gnome-canvas-pixbuf.c
+++ b/libgnomecanvas/gnome-canvas-pixbuf.c
@@ -99,25 +99,20 @@ gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class)
static void
gnome_canvas_pixbuf_init (GnomeCanvasPixbuf *gcp)
{
- GnomeCanvasPixbufPrivate *priv;
-
- priv = gcp->priv = G_TYPE_INSTANCE_GET_PRIVATE (gcp,
- GNOME_TYPE_CANVAS_PIXBUF,
- GnomeCanvasPixbufPrivate);
+ gcp->priv = G_TYPE_INSTANCE_GET_PRIVATE (
+ gcp, GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbufPrivate);
}
/* Dispose handler for the pixbuf canvas item */
static void
gnome_canvas_pixbuf_dispose (GnomeCanvasItem *object)
{
- GnomeCanvasItem *item;
GnomeCanvasPixbuf *gcp;
GnomeCanvasPixbufPrivate *priv;
g_return_if_fail (object != NULL);
g_return_if_fail (GNOME_IS_CANVAS_PIXBUF (object));
- item = GNOME_CANVAS_ITEM (object);
gcp = GNOME_CANVAS_PIXBUF (object);
priv = gcp->priv;
@@ -246,10 +241,8 @@ gnome_canvas_pixbuf_update (GnomeCanvasItem *item,
gint flags)
{
GnomeCanvasPixbuf *gcp;
- GnomeCanvasPixbufPrivate *priv;
gcp = GNOME_CANVAS_PIXBUF (item);
- priv = gcp->priv;
if (GNOME_CANVAS_ITEM_CLASS (gnome_canvas_pixbuf_parent_class)->update)
GNOME_CANVAS_ITEM_CLASS (gnome_canvas_pixbuf_parent_class)->
diff --git a/libgnomecanvas/gnome-canvas-rect.c b/libgnomecanvas/gnome-canvas-rect.c
index a61c98f3c4..d3009b7d13 100644
--- a/libgnomecanvas/gnome-canvas-rect.c
+++ b/libgnomecanvas/gnome-canvas-rect.c
@@ -377,11 +377,8 @@ gnome_canvas_rect_update (GnomeCanvasItem *item,
const cairo_matrix_t *i2c,
gint flags)
{
- GnomeCanvasRect *rect;
gdouble x1, x2, y1, y2;
- rect = GNOME_CANVAS_RECT (item);
-
GNOME_CANVAS_ITEM_CLASS (gnome_canvas_rect_parent_class)->
update (item, i2c, flags);
diff --git a/libgnomecanvas/gnome-canvas-rich-text.c b/libgnomecanvas/gnome-canvas-rich-text.c
index f836c12f1c..8c1e4142d9 100644
--- a/libgnomecanvas/gnome-canvas-rich-text.c
+++ b/libgnomecanvas/gnome-canvas-rich-text.c
@@ -2028,11 +2028,10 @@ gnome_canvas_rich_text_draw (GnomeCanvasItem *item,
gint height)
{
GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
- GtkStyle *style;
GtkWidget *widget;
cairo_matrix_t i2c;
gdouble ax, ay, ax2, ay2;
- gint x1, y1, x2, y2;
+ gint x1, x2;
gnome_canvas_item_i2c_matrix (item, &i2c);
@@ -2045,14 +2044,11 @@ gnome_canvas_rich_text_draw (GnomeCanvasItem *item,
cairo_matrix_transform_point (&i2c, &ax2, &ay2);
x1 = ax;
- y1 = ay;
x2 = ax2;
- y2 = ay2;
gtk_text_layout_set_screen_width (text->_priv->layout, x2 - x1);
widget = GTK_WIDGET (item->canvas);
- style = gtk_widget_get_style (widget);
/* FIXME: should last arg be NULL? */
gtk_text_layout_draw (text->_priv->layout, widget, cr, NULL);
diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c
index 16956fb70a..b26dc94679 100644
--- a/libgnomecanvas/gnome-canvas.c
+++ b/libgnomecanvas/gnome-canvas.c
@@ -1729,7 +1729,6 @@ gnome_canvas_paint_rect (GnomeCanvas *canvas,
gint y1)
{
GtkWidget *widget;
- GdkWindow *bin_window;
GtkAllocation allocation;
GtkScrollable *scrollable;
GtkAdjustment *hadjustment;
@@ -1744,7 +1743,6 @@ gnome_canvas_paint_rect (GnomeCanvas *canvas,
widget = GTK_WIDGET (canvas);
gtk_widget_get_allocation (widget, &allocation);
- bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (canvas));
scrollable = GTK_SCROLLABLE (canvas);
hadjustment = gtk_scrollable_get_hadjustment (scrollable);