changeset 3128:343504d43afc trunk

Fix warnings.
author William Pitcock <nenolod@atheme-project.org>
date Fri, 20 Jul 2007 19:42:24 -0500
parents c92070f10148
children f416657ee9b7
files src/audacious/input.c src/audacious/playback.c src/audacious/playlist.c
diffstat 3 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/input.c	Fri Jul 20 19:37:11 2007 -0500
+++ b/src/audacious/input.c	Fri Jul 20 19:42:24 2007 -0500
@@ -372,7 +372,11 @@
     {
         g_free(filename_proxy);
         vfs_fclose(fd);
-        return ip;
+
+        pr = g_new0(ProbeResult, 1);
+        pr->ip = NULL;
+
+        return pr;
     }
 
     for (node = get_input_list(); node != NULL; node = g_list_next(node))
@@ -550,7 +554,7 @@
     pr = input_check_file(filename_proxy, FALSE);
 
     if (!pr)
-        return;
+        return NULL;
 
     ip = pr->ip;
 
--- a/src/audacious/playback.c	Fri Jul 20 19:37:11 2007 -0500
+++ b/src/audacious/playback.c	Fri Jul 20 19:42:24 2007 -0500
@@ -243,7 +243,7 @@
         }
     }
 
-    if (!entry->decoder || !input_is_enabled(entry->decoder))
+    if (!entry->decoder || !input_is_enabled(entry->decoder->filename))
     {
         set_current_input_playback(NULL);
         mainwin_set_info_text();
--- a/src/audacious/playlist.c	Fri Jul 20 19:37:11 2007 -0500
+++ b/src/audacious/playlist.c	Fri Jul 20 19:42:24 2007 -0500
@@ -188,7 +188,7 @@
 static gboolean
 playlist_entry_get_info(PlaylistEntry * entry)
 {
-    TitleInput *tuple;
+    TitleInput *tuple = NULL;
     ProbeResult *pr = NULL;
     time_t modtime;
 
@@ -209,7 +209,8 @@
     if (entry->decoder == NULL)
     {
         pr = input_check_file(entry->filename, FALSE);
-        entry->decoder = pr->ip;
+        if (pr)
+           entry->decoder = pr->ip;
     }
 
     /* renew tuple if file mtime is newer than tuple mtime. */
@@ -1660,7 +1661,7 @@
 	    !str_has_prefix_nocase(tmp, "https://"))
 	    pr = input_check_file(tmp, FALSE);
 
-        __playlist_ins_with_info(playlist, tmp, pos, title, len, dec, pr ? pr->ip : NULL);
+        __playlist_ins_with_info(playlist, tmp, pos, title, len, pr ? pr->ip : NULL);
         g_free(tmp);
         g_free(path);
         g_free(pr);