From 8a31fb62fe129d6ae60810a78a9e201ed5bb6c73 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Mon, 4 Jan 2010 22:22:11 +0100 Subject: Added -Wall to CCFLAGS and some code cleanup. --- thumbnails.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'thumbnails.c') diff --git a/thumbnails.c b/thumbnails.c index 0359308..ab0d8f1 100644 --- a/thumbnails.c +++ b/thumbnails.c @@ -16,7 +16,7 @@ inline static gchar *get_wall_thumb_name(const gchar *filepath) { ck = g_checksum_new(G_CHECKSUM_MD5); s = g_strdup_printf("file://%s", filepath); - g_checksum_update(ck, s, -1); + g_checksum_update(ck, (const guchar*)s, -1); g_free(s); cksum = g_strdup_printf("%s/.thumbnails/normal/%s.png", g_get_home_dir(), g_checksum_get_string(ck)); g_checksum_free(ck); @@ -56,7 +56,7 @@ inline static gboolean is_thumb_modified(GdkPixbuf *pb, const gchar *filename, c GdkPixbuf *get_thumbnail(const gchar *filepath) { GdkPixbuf *pb, *pb2; gint win_width, win_height, img_width, img_height, width, height; - gdouble scalex, scaley, width_ratio, height_ratio, max_ratio; + gdouble scalex, scaley, width_ratio, height_ratio; GError *error = NULL; gchar *thumbname, *mtime, *width_s, *height_s; @@ -102,7 +102,7 @@ GdkPixbuf *get_thumbnail(const gchar *filepath) { g_object_unref(pb); error = NULL; - mtime = g_strdup_printf("%d", get_mtime(filepath)); + mtime = g_strdup_printf("%lu", (unsigned long)get_mtime(filepath)); width_s = g_strdup_printf("%d", img_width); height_s = g_strdup_printf("%d", img_height); if(!gdk_pixbuf_save(pb2, thumbname, "png", &error, @@ -165,4 +165,6 @@ gpointer add_thumbs_thread(gpointer data) { } thumb_thread = NULL; + + return NULL; } -- cgit v1.2.3