[vlc-devel] commit: MKV: kill warnings. (Jean-Baptiste Kempf )

git version control git at videolan.org
Mon Jan 26 12:59:03 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Jan 26 12:58:33 2009 +0100| [318b67aaa3ea30db00366b94f5ada59c19c1c4e4] | committer: Jean-Baptiste Kempf 

MKV: kill warnings.

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

 modules/demux/mkv/demux.cpp                  |    2 -
 modules/demux/mkv/matroska_segment.cpp       |    4 ---
 modules/demux/mkv/matroska_segment.hpp       |   29 ++-----------------------
 modules/demux/mkv/matroska_segment_parse.cpp |   27 ++++++++++++++++++++++-
 modules/demux/mkv/mkv.cpp                    |    3 +-
 5 files changed, 29 insertions(+), 36 deletions(-)

diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index 9d12f5d..2199b11 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -284,8 +284,6 @@ void * demux_sys_t::EventThread( vlc_object_t *p_this )
         /* KEY part */
         if( p_ev->i_key_action )
         {
-            int i;
-
             msg_Dbg( p_ev->p_demux, "Handle Key Event");
 
             vlc_mutex_lock( &p_ev->lock );
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index fb8172f..a32f041 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -87,7 +87,6 @@ void matroska_segment_c::LoadCues( KaxCues *cues )
 {
     EbmlParser  *ep;
     EbmlElement *el;
-    size_t i, j;
 
     if( b_cues )
     {
@@ -187,7 +186,6 @@ void matroska_segment_c::LoadTags( KaxTags *tags )
 {
     EbmlParser  *ep;
     EbmlElement *el;
-    size_t i, j;
 
     /* Master elements */
     ep = new EbmlParser( &es, tags, &sys.demuxer );
@@ -597,8 +595,6 @@ int matroska_segment_c::BlockFindTrackIndex( size_t *pi_track,
                                              const KaxBlock *p_block, const KaxSimpleBlock *p_simpleblock )
 {
     size_t          i_track;
-    unsigned int    i;
-    bool            b;
 
     for( i_track = 0; i_track < tracks.size(); i_track++ )
     {
diff --git a/modules/demux/mkv/matroska_segment.hpp b/modules/demux/mkv/matroska_segment.hpp
index 424e732..cd0d717 100644
--- a/modules/demux/mkv/matroska_segment.hpp
+++ b/modules/demux/mkv/matroska_segment.hpp
@@ -42,14 +42,14 @@ public:
         ,i_timescale(MKVD_TIMECODESCALE)
         ,i_duration(-1)
         ,i_start_time(0)
+        ,i_seekhead_count(0)
+        ,i_seekhead_position(-1)
         ,i_cues_position(-1)
+        ,i_tracks_position(-1)
         ,i_info_position(-1)
         ,i_chapters_position(-1)
         ,i_tags_position(-1)
-        ,i_tracks_position(-1)
         ,i_attachments_position(-1)
-        ,i_seekhead_position(-1)
-        ,i_seekhead_count(0)
         ,cluster(NULL)
         ,i_block_pos(0)
         ,i_cluster_pos(0)
@@ -159,28 +159,5 @@ public:
     static bool CompareSegmentUIDs( const matroska_segment_c * item_a, const matroska_segment_c * item_b );
 };
 
-/**
- * Helper function to print the mkv parse tree
- */
-static void MkvTree( demux_t & demuxer, int i_level, const char *psz_format, ... )
-{
-    va_list args;
-    if( i_level > 9 )
-    {
-        msg_Err( &demuxer, "too deep tree" );
-        return;
-    }
-    va_start( args, psz_format );
-    static const char psz_foo[] = "|   |   |   |   |   |   |   |   |   |";
-    char *psz_foo2 = (char*)malloc( i_level * 4 + 3 + strlen( psz_format ) );
-    strncpy( psz_foo2, psz_foo, 4 * i_level );
-    psz_foo2[ 4 * i_level ] = '+';
-    psz_foo2[ 4 * i_level + 1 ] = ' ';
-    strcpy( &psz_foo2[ 4 * i_level + 2 ], psz_format );
-    __msg_GenericVa( VLC_OBJECT(&demuxer),VLC_MSG_DBG, "mkv", psz_foo2, args );
-    free( psz_foo2 );
-    va_end( args );
-}
-
 
 #endif
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index b9598c2..bd75f2f 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -35,8 +35,6 @@ void matroska_segment_c::ParseSeekHead( KaxSeekHead *seekhead )
 {
     EbmlParser  *ep;
     EbmlElement *l;
-    size_t i, j;
-    int i_upper_level = 0;
     bool b_seekable;
 
     i_seekhead_count++;
@@ -125,6 +123,31 @@ void matroska_segment_c::ParseSeekHead( KaxSeekHead *seekhead )
     delete ep;
 }
 
+
+/**
+ * Helper function to print the mkv parse tree
+ */
+static void MkvTree( demux_t & demuxer, int i_level, const char *psz_format, ... )
+{
+    va_list args;
+    if( i_level > 9 )
+    {
+        msg_Err( &demuxer, "too deep tree" );
+        return;
+    }
+    va_start( args, psz_format );
+    static const char psz_foo[] = "|   |   |   |   |   |   |   |   |   |";
+    char *psz_foo2 = (char*)malloc( i_level * 4 + 3 + strlen( psz_format ) );
+    strncpy( psz_foo2, psz_foo, 4 * i_level );
+    psz_foo2[ 4 * i_level ] = '+';
+    psz_foo2[ 4 * i_level + 1 ] = ' ';
+    strcpy( &psz_foo2[ 4 * i_level + 2 ], psz_format );
+    __msg_GenericVa( VLC_OBJECT(&demuxer),VLC_MSG_DBG, "mkv", psz_foo2, args );
+    free( psz_foo2 );
+    va_end( args );
+}
+
+
 /*****************************************************************************
  * ParseTrackEntry:
  *****************************************************************************/
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index ae7329a..2e6ae65 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -278,7 +278,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     vlc_meta_t *p_meta;
     input_attachment_t ***ppp_attach;
     int *pi_int;
-    int i;
 
     switch( i_query )
     {
@@ -294,7 +293,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
                                                         p_sys->stored_attachments.size() );
             if( !(*ppp_attach) )
                 return VLC_ENOMEM;
-            for( i = 0; i < p_sys->stored_attachments.size(); i++ )
+            for( size_t i = 0; i < p_sys->stored_attachments.size(); i++ )
             {
                 attachment_c *a = p_sys->stored_attachments[i];
                 (*ppp_attach)[i] = vlc_input_attachment_New( a->psz_file_name.c_str(), a->psz_mime_type.c_str(), NULL,




More information about the vlc-devel mailing list