[PATCH] Couple of bug fixes

Bastien Nocera <[email protected]>
Newsgroups gmane.comp.ipod.gtkpod
Message-ID <[email protected]>
Couple of patches necessary to get libgpod built on Fedora 15.

Cheers

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d

_______________________________________________
Gtkpod-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-devel
0001-Fix-warnings-with-GCC-4.6.patch (text/x-patch, 2.9 KB)
>From d8ccc237299b5bfc27176bab4a015f2c1fdd6146 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <[email protected]>
Date: Sun, 20 Mar 2011 22:30:35 +0000
Subject: [PATCH 1/2] Fix warnings with GCC 4.6

Set but unused variables, and a few used variables that could
be unset.
---
 src/itdb_chapterdata.c |    2 --
 src/itdb_itunesdb.c    |    6 +-----
 src/itdb_sqlite.c      |    2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/itdb_chapterdata.c b/src/itdb_chapterdata.c
index 469e8b5..29fabb9 100644
--- a/src/itdb_chapterdata.c
+++ b/src/itdb_chapterdata.c
@@ -101,14 +101,12 @@ static GList *dup_chapters (GList *chapters)
 Itdb_Chapterdata *itdb_chapterdata_duplicate (Itdb_Chapterdata *chapterdata)
 {
     Itdb_Chapterdata *dup;
-    int numchapters;
     g_return_val_if_fail (chapterdata, NULL);
 
     dup = g_new0 (Itdb_Chapterdata, 1);
 
     memcpy (dup, chapterdata, sizeof (Itdb_Chapterdata));
 
-    numchapters = g_list_length (chapterdata->chapters);
     if (chapterdata->chapters)
 	dup->chapters = dup_chapters (chapterdata->chapters);
     else
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index 840e95b..446e43f 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -5337,7 +5337,6 @@ static void write_one_podcast_group (gpointer key, gpointer value,
     WContents *cts;
     glong mhip_seek;
     guint32 groupid;
-    Itdb_iTunesDB *itdb;
     MHODData mhod;
 
     g_return_if_fail (album);
@@ -5347,7 +5346,6 @@ static void write_one_podcast_group (gpointer key, gpointer value,
     g_return_if_fail (fexp->wcontents);
 
     cts = fexp->wcontents;
-    itdb = fexp->itdb;
     mhip_seek = cts->pos;
 
     groupid = fexp->next_id++;
@@ -6816,7 +6814,6 @@ static gboolean write_bdhs (FExport *fexp)
 	WContents *cts;
 	gulong bdhs_seek;
 	guint32 trackcnt;
-	guint32 playlistcnt;
 
 	g_return_val_if_fail (fexp, FALSE);
 	g_return_val_if_fail (fexp->itdb, FALSE);
@@ -6825,7 +6822,6 @@ static gboolean write_bdhs (FExport *fexp)
 	cts = fexp->wcontents;
 	bdhs_seek = cts->pos;
 	trackcnt = itdb_tracks_number (fexp->itdb);
-	playlistcnt = itdb_playlists_number (fexp->itdb);
 
 	put_header (cts, "bdhs");
 	put32lint (cts, 0x02000003); /* Unknown */
@@ -8335,7 +8331,7 @@ static gboolean itdb_create_directories (Itdb_Device *device, GError **error)
     gboolean result;
     gchar *pbuf;
     gint i, dirnum;
-    gchar *podpath;
+    gchar *podpath = NULL;
     gchar *model_number;
     Itdb_IpodInfo const *info = NULL;
 
diff --git a/src/itdb_sqlite.c b/src/itdb_sqlite.c
index 6c920f4..4b64710 100644
--- a/src/itdb_sqlite.c
+++ b/src/itdb_sqlite.c
@@ -612,7 +612,7 @@ static int mk_Library(Itdb_iTunesDB *itdb,
     Itdb_Playlist *dev_playlist = NULL;
     int idx = 0;
     int pos = 0;
-    GHashTable *genre_map;
+    GHashTable *genre_map = NULL;
     GHashTable **orders = NULL;
     guint32 genre_index;
     printf("library_persistent_id = 0x%016"G_GINT64_MODIFIER"x\n", itdb->priv->pid);
-- 
1.7.4.1
0002-Require-gmodule-2.0-for-the-blob-loading-code.patch (text/x-patch, 931 B)
>From 3c959099e096bbceee5a1d9da8394e281797d9f7 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <[email protected]>
Date: Sun, 20 Mar 2011 22:31:34 +0000
Subject: [PATCH 2/2] Require gmodule-2.0 for the blob loading code

---
 configure.ac |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index a52ac3a..aabb441 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,7 +42,7 @@ AC_CHECK_FUNCS([localtime_r])
 AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <time.h>])
 dnl sqlite3 is needed for newer ipod models (nano5g), and libplist is needed 
 dnl by libgpod sqlite code
-PKG_CHECK_MODULES(LIBGPOD, glib-2.0 >= 2.8.0 gobject-2.0 sqlite3 libplist >= 1.0)
+PKG_CHECK_MODULES(LIBGPOD, glib-2.0 >= 2.8.0 gobject-2.0 sqlite3 libplist >= 1.0 gmodule-2.0)
 
 dnl **************************************************
 dnl we've copied gchecksum from glib 2.16. Only use the
-- 
1.7.4.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.