From 09b643f62fc415b50a6d85079e0e503b6bd8f2a6 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Tue, 6 Jul 2010 21:28:04 -0400 Subject: [PATCH] Fixed a few -Wall warnings. --- src/label-image.c | 2 ++ src/svg-cache.c | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/label-image.c b/src/label-image.c index 46fc49f6..6201e26a 100644 --- a/src/label-image.c +++ b/src/label-image.c @@ -29,6 +29,7 @@ #include #include "pixbuf-util.h" +#include "file-util.h" #include "pixmaps/checkerboard.xpm" #include "debug.h" @@ -474,6 +475,7 @@ gl_label_image_set_pixbuf (glLabelImage *this, } pixbuf_cache = gl_label_get_pixbuf_cache (label); + svg_cache = gl_label_get_svg_cache (label); /* Remove reference to previous item. */ switch (this->priv->type) diff --git a/src/svg-cache.c b/src/svg-cache.c index f1161bd5..60d99276 100644 --- a/src/svg-cache.c +++ b/src/svg-cache.c @@ -116,7 +116,6 @@ gl_svg_cache_add_svg (GHashTable *svg_cache, const gchar *contents) { CacheRecord *test_record, *record; - RsvgHandle *svg_handle; gl_debug (DEBUG_SVG_CACHE, "START"); @@ -130,7 +129,7 @@ gl_svg_cache_add_svg (GHashTable *svg_cache, record = g_new0 (CacheRecord, 1); record->key = g_strdup (name); record->references = 0; /* No references yet. */ - record->svg_handle = rsvg_handle_new_from_data (contents, strlen(contents), NULL); + record->svg_handle = rsvg_handle_new_from_data ((guchar *)contents, strlen(contents), NULL); record->contents = g_strdup (contents); g_hash_table_insert (svg_cache, record->key, record); @@ -168,7 +167,7 @@ gl_svg_cache_get_handle (GHashTable *svg_cache, file = g_file_new_for_path (name); if ( g_file_load_contents (file, NULL, &buffer, &length, NULL, NULL) ) { - svg_handle = rsvg_handle_new_from_data (buffer, length, NULL); + svg_handle = rsvg_handle_new_from_data ((guchar *)buffer, length, NULL); if ( svg_handle != NULL) { record = g_new0 (CacheRecord, 1); record->key = g_strdup (name); @@ -195,8 +194,6 @@ gl_svg_cache_get_contents (GHashTable *svg_cache, gchar *name) { CacheRecord *record; - RsvgHandle *svg_handle = NULL; - GFile *file; gl_debug (DEBUG_SVG_CACHE, "START svg_cache=%p", svg_cache); -- 2.39.5