[vlc-commits] MKV: remove unused variables

Jean-Baptiste Kempf git at videolan.org
Sat May 21 23:53:00 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat May 21 23:24:26 2011 +0200| [c5d8d051496276b06e63e0892f0ab509db3fc112] | committer: Jean-Baptiste Kempf

MKV: remove unused variables

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

 modules/demux/mkv/chapter_command.cpp        |    4 ++--
 modules/demux/mkv/chapter_command.hpp        |    2 +-
 modules/demux/mkv/demux.cpp                  |   13 +++++--------
 modules/demux/mkv/matroska_segment.cpp       |    4 ----
 modules/demux/mkv/matroska_segment_parse.cpp |    2 +-
 modules/demux/mkv/mkv.hpp                    |    2 +-
 modules/demux/mkv/stream_io_callback.cpp     |    5 +++++
 modules/demux/mkv/stream_io_callback.hpp     |    2 +-
 8 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/modules/demux/mkv/chapter_command.cpp b/modules/demux/mkv/chapter_command.cpp
index 293c502..d74f4ee 100644
--- a/modules/demux/mkv/chapter_command.cpp
+++ b/modules/demux/mkv/chapter_command.cpp
@@ -587,12 +587,12 @@ bool dvd_command_interpretor_c::Interpret( const binary * p_command, size_t i_si
 
 
 
-bool dvd_command_interpretor_c::MatchIsDomain( const chapter_codec_cmds_c &data, const void *p_cookie, size_t i_cookie_size )
+bool dvd_command_interpretor_c::MatchIsDomain( const chapter_codec_cmds_c &data, const void *, size_t )
 {
     return ( data.p_private_data != NULL && data.p_private_data->GetBuffer()[0] == MATROSKA_DVD_LEVEL_SS );
 }
 
-bool dvd_command_interpretor_c::MatchIsVMG( const chapter_codec_cmds_c &data, const void *p_cookie, size_t i_cookie_size )
+bool dvd_command_interpretor_c::MatchIsVMG( const chapter_codec_cmds_c &data, const void *, size_t )
 {
     if ( data.p_private_data == NULL || data.p_private_data->GetSize() < 2 )
         return false;
diff --git a/modules/demux/mkv/chapter_command.hpp b/modules/demux/mkv/chapter_command.hpp
index a7a5d98..750b341 100644
--- a/modules/demux/mkv/chapter_command.hpp
+++ b/modules/demux/mkv/chapter_command.hpp
@@ -79,7 +79,7 @@ public:
     /// \return wether the codec has seeked in the files or not
     virtual bool Enter() { return false; }
     virtual bool Leave() { return false; }
-    virtual std::string GetCodecName( bool f_for_title = false ) const { return ""; }
+    virtual std::string GetCodecName( bool ) const { return ""; }
     virtual int16 GetTitleNumber() { return -1; }
 
     KaxChapterProcessPrivate *p_private_data;
diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index 6f87b99..13ae5e0 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -87,6 +87,7 @@ void event_thread_t::ResetPci()
 int event_thread_t::EventMouse( vlc_object_t *p_this, char const *psz_var,
                                 vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
+    VLC_UNUSED( oldval ); VLC_UNUSED( newval );
     event_thread_t *p_ev = (event_thread_t *) p_data;
     vlc_mutex_lock( &p_ev->lock );
     if( psz_var[6] == 'c' )
@@ -118,6 +119,7 @@ int event_thread_t::EventKey( vlc_object_t *p_this, char const *,
 int event_thread_t::EventInput( vlc_object_t *p_this, char const *,
                                 vlc_value_t, vlc_value_t newval, void *p_data )
 {
+    VLC_UNUSED( p_this );
     event_thread_t *p_ev = (event_thread_t *) p_data;
     vlc_mutex_lock( &p_ev->lock );
     if( newval.i_int == INPUT_EVENT_VOUT )
@@ -130,7 +132,6 @@ int event_thread_t::EventInput( vlc_object_t *p_this, char const *,
     return VLC_SUCCESS;
 }
 
-
 void event_thread_t::EventThread()
 {
     demux_sys_t    *p_sys = p_demux->p_sys;
@@ -160,8 +161,6 @@ void event_thread_t::EventThread()
             break;
         }
 
-        bool b_activated = false;
-
         /* KEY part */
         if( i_key_action )
         {
@@ -266,8 +265,6 @@ void event_thread_t::EventThread()
                 }
                 break;
             case ACTIONID_NAV_ACTIVATE:
-                b_activated = true;
- 
                 if ( i_curr_button > 0 && i_curr_button <= pci->hli.hl_gi.btn_ns )
                 {
                     btni_t button_ptr = pci->hli.btnit[i_curr_button-1];
@@ -304,7 +301,6 @@ void event_thread_t::EventThread()
 
                 msg_Dbg( p_demux, "Handle Mouse Event: Mouse clicked x(%d)*y(%d)", x, y);
 
-                b_activated = true;
                 // get current button
                 best = 0;
                 dist = 0x08000000; /* >> than  (720*720)+(567*567); */
@@ -435,6 +431,7 @@ void event_thread_t::EventThread()
 
     vlc_restorecancel (canc);
 }
+
 void *event_thread_t::EventThread(void *data)
 {
     static_cast<event_thread_t*>(data)->EventThread();
@@ -642,7 +639,7 @@ void demux_sys_t::PreloadLinked( matroska_segment_c *p_segment )
     virtual_segment_c *p_seg;
 
     p_current_segment = VirtualFromSegments( p_segment );
- 
+
     used_segments.push_back( p_current_segment );
 
     // create all the other virtual segments of the family
@@ -771,7 +768,7 @@ void demux_sys_t::JumpTo( virtual_segment_c & vsegment, chapter_item_c * p_chapt
             vsegment.Seek( demuxer, p_chapter->i_user_start_time, -1, p_chapter, -1 );
         }
     }
- 
+
 }
 
 matroska_segment_c *demux_sys_t::FindSegment( const EbmlBinary & uid ) const
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index c08dc8c..7b24b34 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -1125,12 +1125,8 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
             p_fmt->audio.i_rate = 8000;
             p_fmt->audio.i_blockalign = 0x14;
         }
-        /* disabled due to the potential "S_KATE" namespace issue */
         else if( !strcmp( p_tk->psz_codec, "S_KATE" ) )
         {
-            int i, i_offset = 1, i_extra, num_headers, size_so_far;
-            uint8_t *p_extra;
-
             p_tk->fmt.i_codec = VLC_CODEC_KATE;
             p_tk->fmt.subs.psz_encoding = strdup( "UTF-8" );
 
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index d669c5c..ad31e0b 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -549,7 +549,7 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
 
                     i_display_unit = uint8( vdmode );
                     msg_Dbg( &sys.demuxer, "|   |   |   |   + Track Video Display Unit=%s",
-                             uint8( vdmode ) == 0 ? "pixels" : ( uint8( vdmode ) == 1 ? "centimeters": "inches" ) );
+                             i_display_unit == 0 ? "pixels" : ( i_display_unit == 1 ? "centimeters": "inches" ) );
                 }
                 else if( MKV_IS_ID( l, KaxVideoAspectRatio ) ) // UNUSED
                 {
diff --git a/modules/demux/mkv/mkv.hpp b/modules/demux/mkv/mkv.hpp
index c7b6194..38fe532 100644
--- a/modules/demux/mkv/mkv.hpp
+++ b/modules/demux/mkv/mkv.hpp
@@ -179,7 +179,7 @@ typedef struct
     bool         b_enabled;
     unsigned int i_number;
 
-    int          i_extra_data;
+    unsigned int i_extra_data;
     uint8_t      *p_extra_data;
 
     char         *psz_codec;
diff --git a/modules/demux/mkv/stream_io_callback.cpp b/modules/demux/mkv/stream_io_callback.cpp
index a4dbb6a..ae3cd8f 100644
--- a/modules/demux/mkv/stream_io_callback.cpp
+++ b/modules/demux/mkv/stream_io_callback.cpp
@@ -82,3 +82,8 @@ uint64 vlc_stream_io_callback::getFilePointer( void )
     return stream_Tell( s );
 }
 
+size_t vlc_stream_io_callback::write(const void *, size_t )
+{
+    return 0;
+}
+
diff --git a/modules/demux/mkv/stream_io_callback.hpp b/modules/demux/mkv/stream_io_callback.hpp
index ea6fbfb..c67faeb 100644
--- a/modules/demux/mkv/stream_io_callback.hpp
+++ b/modules/demux/mkv/stream_io_callback.hpp
@@ -44,7 +44,7 @@ class vlc_stream_io_callback: public IOCallback
 
     virtual uint32   read            ( void *p_buffer, size_t i_size);
     virtual void     setFilePointer  ( int64_t i_offset, seek_mode mode = seek_beginning );
-    virtual size_t   write           ( const void *p_buffer, size_t i_size) { return 0; }
+    virtual size_t   write           ( const void *p_buffer, size_t i_size);
     virtual uint64   getFilePointer  ( void );
     virtual void     close           ( void ) { return; }
 };



More information about the vlc-commits mailing list