From 7093e7fe38a35490d67c2535ad1ea6d3080ece83 Mon Sep 17 00:00:00 2001 From: Jorg Schuler Date: Fri, 30 May 2008 13:00:24 +0000 Subject: * src/itdb_thumb.c src/itdb_thumb.h src/ithumb-writer.c src/itdb_photoalbum.c: fixed a number of compile-time warnings. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1994 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- ChangeLog | 7 +++++++ src/itdb_photoalbum.c | 2 +- src/itdb_thumb.c | 9 +++++---- src/itdb_thumb.h | 2 +- src/ithumb-writer.c | 6 ++++-- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4728d3..2f12ddd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-30 Jorg Schuler + + * src/itdb_thumb.c + src/itdb_thumb.h + src/ithumb-writer.c + src/itdb_photoalbum.c: fixed a number of compile-time warnings. + 2008-05-30 Christophe Fergeau Patch from Ian Stewart diff --git a/src/itdb_photoalbum.c b/src/itdb_photoalbum.c index 614236f..86c4917 100644 --- a/src/itdb_photoalbum.c +++ b/src/itdb_photoalbum.c @@ -358,7 +358,7 @@ static Itdb_Artwork *itdb_photodb_add_photo_internal (Itdb_PhotoDB *db, GError **error) { #ifdef HAVE_GDKPIXBUF - gboolean result; + gboolean result=FALSE; Itdb_Artwork *artwork; Itdb_PhotoAlbum *album; diff --git a/src/itdb_thumb.c b/src/itdb_thumb.c index e670467..f65abd1 100644 --- a/src/itdb_thumb.c +++ b/src/itdb_thumb.c @@ -84,7 +84,7 @@ Itdb_Thumb_Ipod_Item *itdb_thumb_new_item_from_ipod (const Itdb_ArtworkFormat *f return thumb_ipod; } -Itdb_Thumb *itdb_thumb_ipod_new (void) +G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_ipod_new (void) { Itdb_Thumb *thumb; @@ -359,7 +359,7 @@ const GList *itdb_thumb_ipod_get_thumbs (Itdb_Thumb_Ipod *thumbs) gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb, gint width, gint height) { - GdkPixbuf *pixbuf; + GdkPixbuf *pixbuf=NULL; if (thumb->data_type == ITDB_THUMB_TYPE_FILE) { Itdb_Thumb_File *thumb_file = (Itdb_Thumb_File *)thumb; @@ -430,11 +430,12 @@ gpointer itdb_thumb_to_pixbuf_at_size (Itdb_Device *device, Itdb_Thumb *thumb, GList *itdb_thumb_ipod_to_pixbufs (Itdb_Device *dev, Itdb_Thumb_Ipod *thumb) { - g_return_val_if_fail (thumb != NULL, NULL); - g_return_val_if_fail (thumb->parent.data_type == ITDB_THUMB_TYPE_IPOD, NULL); const GList *items; GList *pixbufs = NULL; + g_return_val_if_fail (thumb != NULL, NULL); + g_return_val_if_fail (thumb->parent.data_type == ITDB_THUMB_TYPE_IPOD, NULL); + for (items = itdb_thumb_ipod_get_thumbs (thumb); items != NULL; items = items->next) { diff --git a/src/itdb_thumb.h b/src/itdb_thumb.h index db341af..7d8d305 100644 --- a/src/itdb_thumb.h +++ b/src/itdb_thumb.h @@ -96,7 +96,7 @@ G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_new_from_data (const guchar *data, gsize len); G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_new_from_pixbuf (GdkPixbuf *pixbuf); G_GNUC_INTERNAL Itdb_Thumb_Ipod_Item *itdb_thumb_new_item_from_ipod (const Itdb_ArtworkFormat *format); -G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_ipod_new (); +G_GNUC_INTERNAL Itdb_Thumb *itdb_thumb_ipod_new (void); G_GNUC_INTERNAL void itdb_thumb_set_rotation (Itdb_Thumb *thumb, guint rotation); G_GNUC_INTERNAL guint itdb_thumb_get_rotation (Itdb_Thumb *thumb); diff --git a/src/ithumb-writer.c b/src/ithumb-writer.c index a123285..936c4b3 100644 --- a/src/ithumb-writer.c +++ b/src/ithumb-writer.c @@ -1,4 +1,4 @@ -/* Time-stamp: <2008-05-25 23:15:17 jcs> +/* Time-stamp: <2008-05-30 21:49:11 jcs> * * Copyright (C) 2005 Christophe Fergeau * @@ -1291,9 +1291,11 @@ ithmb_rearrange_existing_thumbnails (Itdb_DB *db, case DB_TYPE_ITUNES: for (gl=db_get_itunesdb(db)->tracks; gl; gl=gl->next) { + Itdb_Thumb *thumb; Itdb_Track *track = gl->data; + g_return_val_if_fail (track, FALSE); - Itdb_Thumb *thumb = track->artwork->thumbnail; + thumb = track->artwork->thumbnail; if (!itdb_track_has_thumbnails (track)) { continue; } -- cgit