[vlc-commits] Avformat demuxer: kill 2 warnings about signedness

Jean-Baptiste Kempf git at videolan.org
Sat May 14 18:43:49 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat May 14 18:42:39 2011 +0200| [63e333c2fa7d94ea5075fc09b59d0096be5fe754] | committer: Jean-Baptiste Kempf

Avformat demuxer: kill 2 warnings about signedness

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

 modules/demux/avformat/demux.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 048f3eb..fb3c8cb 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -638,7 +638,7 @@ static block_t *BuildSsaFrame( const AVPacket *p_pkt, unsigned i_order )
         return NULL;
 
     char buffer[256];
-    const size_t i_buffer_size = __MIN( sizeof(buffer) - 1, p_pkt->size );
+    const size_t i_buffer_size = __MIN( (int)sizeof(buffer) - 1, p_pkt->size );
     memcpy( buffer, p_pkt->data, i_buffer_size );
     buffer[i_buffer_size] = '\0';
 
@@ -650,7 +650,7 @@ static block_t *BuildSsaFrame( const AVPacket *p_pkt, unsigned i_order )
     if( sscanf( buffer, "Dialogue: %d,%d:%d:%d.%d,%d:%d:%d.%d,%n", &i_layer,
                 &h0, &m0, &s0, &c0, &h1, &m1, &s1, &c1, &i_position ) < 9 )
         return NULL;
-    if( i_position <= 0 || i_position >= i_buffer_size )
+    if( i_position <= 0 || (unsigned)i_position >= i_buffer_size )
         return NULL;
 
     char *p;



More information about the vlc-commits mailing list