[librsvg] Fix unused-but-set-variable warnings
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Fix unused-but-set-variable warnings
- Date: Mon, 7 Nov 2011 19:28:32 +0000 (UTC)
commit 0cabddcbddf870591017ce2a0d1567309d1a0ed8
Author: Christian Persch <chpe gnome org>
Date: Mon Nov 7 18:06:39 2011 +0100
Fix unused-but-set-variable warnings
gdk-pixbuf-loader/io-svg.c | 2 +-
gtk-engine/svg-draw.c | 7 +------
rsvg-base.c | 5 ++---
rsvg-filter.c | 16 ++--------------
test-display.c | 6 ++----
5 files changed, 8 insertions(+), 28 deletions(-)
---
diff --git a/gdk-pixbuf-loader/io-svg.c b/gdk-pixbuf-loader/io-svg.c
index dac8f4e..2844ee6 100644
--- a/gdk-pixbuf-loader/io-svg.c
+++ b/gdk-pixbuf-loader/io-svg.c
@@ -172,7 +172,7 @@ gdk_pixbuf__svg_image_stop_load (gpointer data, GError **error)
g_object_unref (context->handle);
g_free (context);
- return TRUE;
+ return result;
}
void
diff --git a/gtk-engine/svg-draw.c b/gtk-engine/svg-draw.c
index 8363546..ff5d303 100644
--- a/gtk-engine/svg-draw.c
+++ b/gtk-engine/svg-draw.c
@@ -100,13 +100,10 @@ draw_simple_image(GtkStyle *style,
gint height)
{
ThemeImage *image;
- gboolean setbg = FALSE;
if ((width == -1) && (height == -1))
{
gdk_drawable_get_size(window, &width, &height);
- if (allow_setbg)
- setbg = TRUE;
}
else if (width == -1)
gdk_drawable_get_size(window, &width, NULL);
@@ -163,12 +160,10 @@ draw_gap_image(GtkStyle *style,
gint gap_width)
{
ThemeImage *image;
- gboolean setbg = FALSE;
-
+
if ((width == -1) && (height == -1))
{
gdk_drawable_get_size(window, &width, &height);
- setbg = TRUE;
}
else if (width == -1)
gdk_drawable_get_size(window, &width, NULL);
diff --git a/rsvg-base.c b/rsvg-base.c
index d2784f7..7cab26b 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -596,11 +596,10 @@ rsvg_start_xinclude (RsvgHandle * ctx, RsvgPropertyBag * atts)
/* xml */
xmlDocPtr xml_doc;
xmlParserCtxtPtr xml_parser;
- int result;
xml_parser = xmlCreatePushParserCtxt (&rsvgSAXHandlerStruct, ctx, NULL, 0, NULL);
- result = xmlParseChunk (xml_parser, (char *) data->data, data->len, 0);
- result = xmlParseChunk (xml_parser, "", 0, TRUE);
+ (void) xmlParseChunk (xml_parser, (char *) data->data, data->len, 0);
+ (void) xmlParseChunk (xml_parser, "", 0, TRUE);
xml_doc = xml_parser->myDoc;
xmlFreeParserCtxt (xml_parser);
diff --git a/rsvg-filter.c b/rsvg-filter.c
index 500679c..2e310c2 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -1265,17 +1265,11 @@ box_blur (GdkPixbuf * in, GdkPixbuf * output, guchar * intermediate, gint kw,
{
gint ch;
gint x, y;
- gint rowstride, height, width;
-
+ gint rowstride;
guchar *in_pixels;
guchar *output_pixels;
-
gint sum;
-
- height = gdk_pixbuf_get_height (in);
- width = gdk_pixbuf_get_width (in);
-
in_pixels = gdk_pixbuf_get_pixels (in);
output_pixels = gdk_pixbuf_get_pixels (output);
@@ -2098,12 +2092,9 @@ rsvg_filter_primitive_component_transfer_render (RsvgFilterPrimitive *
gint achan = ctx->channelmap[3];
guchar *in_pixels;
guchar *output_pixels;
-
- RsvgFilterPrimitiveComponentTransfer *upself;
-
GdkPixbuf *output;
GdkPixbuf *in;
- upself = (RsvgFilterPrimitiveComponentTransfer *) self;
+
boundarys = rsvg_filter_primitive_get_bounds (self, ctx);
for (c = 0; c < 4; c++) {
@@ -4318,9 +4309,6 @@ rsvg_filter_primitive_tile_render (RsvgFilterPrimitive * self, RsvgFilterContext
GdkPixbuf *output;
GdkPixbuf *in;
- RsvgFilterPrimitiveTile *upself;
-
- upself = (RsvgFilterPrimitiveTile *) self;
oboundarys = rsvg_filter_primitive_get_bounds (self, ctx);
input = rsvg_filter_get_result (self->in, ctx);
diff --git a/test-display.c b/test-display.c
index c4abdca..06dcd18 100644
--- a/test-display.c
+++ b/test-display.c
@@ -72,7 +72,6 @@ get_image_size_from_data (ViewerCbInfo *info,
{
RsvgHandle *handle;
RsvgDimensionData dimensions;
- gboolean ret;
handle = rsvg_handle_new ();
@@ -93,7 +92,7 @@ get_image_size_from_data (ViewerCbInfo *info,
return FALSE;
}
- ret = rsvg_handle_get_dimensions_sub (handle, &dimensions, info->id);
+ (void) rsvg_handle_get_dimensions_sub (handle, &dimensions, info->id);
g_object_unref (handle);
if (width)
@@ -344,7 +343,6 @@ static void
print_pixbuf (GObject * ignored, gpointer user_data)
{
GtkPrintOperation *print;
- GtkPrintOperationResult res;
ViewerCbInfo *info = (ViewerCbInfo *) user_data;
print = gtk_print_operation_new ();
@@ -352,7 +350,7 @@ print_pixbuf (GObject * ignored, gpointer user_data)
g_signal_connect (print, "begin_print", G_CALLBACK (begin_print), info);
g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), info);
- res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
+ (void)gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
GTK_WINDOW (info->window), NULL);
g_object_unref (print);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]