[vlc-commits] libvlc_audio_set_track: return -1 on error

Rémi Denis-Courmont git at videolan.org
Mon Feb 4 17:41:37 CET 2013


vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb  4 18:38:04 2013 +0200| [2c27b625fb986779462a4bc5e2dd1378c82fe62d] | committer: Rémi Denis-Courmont

libvlc_audio_set_track: return -1 on error

Surprisingly, my gcc did not generate a possible unitilization warning.
(cherry picked from commit ce96ee78f58c6d24eb66d5544b571cc3d0aa4343)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=2c27b625fb986779462a4bc5e2dd1378c82fe62d
---

 lib/audio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/audio.c b/lib/audio.c
index 597de21..414580f 100644
--- a/lib/audio.c
+++ b/lib/audio.c
@@ -399,7 +399,7 @@ int libvlc_audio_set_track( libvlc_media_player_t *p_mi, int i_track )
 {
     input_thread_t *p_input_thread = libvlc_get_input_thread( p_mi );
     vlc_value_t val_list;
-    int i_ret;
+    int i_ret = -1;
 
     if( !p_input_thread )
         return -1;



More information about the vlc-commits mailing list