diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-01-04 22:22:11 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-01-04 22:22:11 +0100 |
commit | 8a31fb62fe129d6ae60810a78a9e201ed5bb6c73 (patch) | |
tree | 57406a09e4c20724263f21ba9b6da640bd18019c /thumbnails.c | |
parent | 3e664405587c5cf44fa05dc4a5864ce08243c1dc (diff) |
Added -Wall to CCFLAGS and some code cleanup.
Diffstat (limited to 'thumbnails.c')
-rw-r--r-- | thumbnails.c | 8 |
1 files changed, 5 insertions, 3 deletions
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; } |