[vlc-devel] commit: Make the buildbot happy by fixing some of the warnings. ( Rémi Duraffort )

git version control git at videolan.org
Wed Aug 20 19:31:26 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Aug 20 19:12:33 2008 +0200| [ce94e2fe66764599fe29959665e2e5348866e8dd] | committer: Rémi Duraffort 

Make the buildbot happy by fixing some of the warnings.

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

 modules/demux/ps.h     |    2 +-
 modules/demux/vobsub.c |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/demux/ps.h b/modules/demux/ps.h
index 191cce3..145880d 100644
--- a/modules/demux/ps.h
+++ b/modules/demux/ps.h
@@ -183,7 +183,7 @@ static inline int ps_pkt_id( block_t *p_pkt )
 {
     if( p_pkt->p_buffer[3] == 0xbd &&
         p_pkt->i_buffer >= 9 &&
-        p_pkt->i_buffer >= 9 + p_pkt->p_buffer[8] )
+        p_pkt->i_buffer >= 9 + (size_t)p_pkt->p_buffer[8] )
     {
         /* VOB extension */
         return 0xbd00 | p_pkt->p_buffer[9+p_pkt->p_buffer[8]];
diff --git a/modules/demux/vobsub.c b/modules/demux/vobsub.c
index e529939..508a42c 100644
--- a/modules/demux/vobsub.c
+++ b/modules/demux/vobsub.c
@@ -182,7 +182,11 @@ static int Open ( vlc_object_t *p_this )
         }
     }
 
-    asprintf( &psz_vobname, "%s://%s", p_demux->psz_access, p_demux->psz_path );
+    if( asprintf( &psz_vobname, "%s://%s", p_demux->psz_access, p_demux->psz_path ) == -1 )
+    {
+        free( p_sys );
+        return VLC_EGENERIC;
+    }
     i_len = strlen( psz_vobname );
     if( i_len >= 4 ) memcpy( psz_vobname + i_len - 4, ".sub", 4 );
 




More information about the vlc-devel mailing list