[vlc-devel] commit: Fix warnings ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Jun 15 15:21:02 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Jun 15 16:22:53 2008 +0300| [10ca561a7fb0f5b9b76063380c6b393b384afb95]

Fix warnings

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

 modules/demux/playlist/m3u.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/modules/demux/playlist/m3u.c b/modules/demux/playlist/m3u.c
index 49e4869..f2de477 100644
--- a/modules/demux/playlist/m3u.c
+++ b/modules/demux/playlist/m3u.c
@@ -73,9 +73,8 @@ int Import_M3U( vlc_object_t *p_this )
 
 static bool ContainsURL( demux_t *p_demux )
 {
-    uint8_t *p_peek;
+    const uint8_t *p_peek, *p_peek_end;
     int i_peek;
-    uint8_t *p_peek_end;
 
     i_peek = stream_Peek( p_demux->s, &p_peek, 1024 );
     if( i_peek <= 0 ) return false;
@@ -84,11 +83,11 @@ static bool ContainsURL( demux_t *p_demux )
     while( p_peek + sizeof( "https://" ) < p_peek_end )
     {
         /* One line starting with an URL is enough */
-        if( !strncasecmp( p_peek, "http://", sizeof( "http://" ) - 1 ) ||
-            !strncasecmp( p_peek, "mms://", sizeof( "mms://" ) - 1 ) ||
-            !strncasecmp( p_peek, "rtsp://", sizeof( "rtsp://" ) - 1 ) ||
-            !strncasecmp( p_peek, "https://", sizeof( "https://" ) - 1 ) ||
-            !strncasecmp( p_peek, "ftp://", sizeof( "ftp://" ) - 1 ) )
+        if( !strncasecmp( (const char *)p_peek, "http://", 7 ) ||
+            !strncasecmp( (const char *)p_peek, "mms://", 6 ) ||
+            !strncasecmp( (const char *)p_peek, "rtsp://", 7 ) ||
+            !strncasecmp( (const char *)p_peek, "https://", 8 ) ||
+            !strncasecmp( (const char *)p_peek, "ftp://", 6 ) )
         {
             return true;
         }




More information about the vlc-devel mailing list