[vlc-commits] flac: fix warnings (unsigned -> size_t)

Rafaël Carré git at videolan.org
Mon Jun 13 18:48:02 CEST 2011


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Sun Jun 12 21:32:47 2011 -0400| [7c39a79229be076de931ba5cacde7c554903b136] | committer: Rafaël Carré

flac: fix warnings (unsigned -> size_t)

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

 modules/codec/flac.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/codec/flac.c b/modules/codec/flac.c
index c348a42..005e783 100644
--- a/modules/codec/flac.c
+++ b/modules/codec/flac.c
@@ -101,7 +101,7 @@ static aout_buffer_t *DecodeBlock( decoder_t *, block_t ** );
 
 static FLAC__StreamDecoderReadStatus
 DecoderReadCallback( const FLAC__StreamDecoder *decoder,
-                     FLAC__byte buffer[], unsigned *bytes, void *client_data );
+                     FLAC__byte buffer[], size_t *bytes, void *client_data );
 
 static FLAC__StreamDecoderWriteStatus
 DecoderWriteCallback( const FLAC__StreamDecoder *decoder,
@@ -308,7 +308,7 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
  *****************************************************************************/
 static FLAC__StreamDecoderReadStatus
 DecoderReadCallback( const FLAC__StreamDecoder *decoder, FLAC__byte buffer[],
-                     unsigned *bytes, void *client_data )
+                     size_t *bytes, void *client_data )
 {
     VLC_UNUSED(decoder);
     decoder_t *p_dec = (decoder_t *)client_data;
@@ -316,7 +316,7 @@ DecoderReadCallback( const FLAC__StreamDecoder *decoder, FLAC__byte buffer[],
 
     if( p_sys->p_block && p_sys->p_block->i_buffer )
     {
-        *bytes = __MIN(*bytes, (unsigned)p_sys->p_block->i_buffer);
+        *bytes = __MIN(*bytes, p_sys->p_block->i_buffer);
         memcpy( buffer, p_sys->p_block->p_buffer, *bytes );
         p_sys->p_block->i_buffer -= *bytes;
         p_sys->p_block->p_buffer += *bytes;
@@ -633,7 +633,7 @@ static block_t *Encode( encoder_t *, aout_buffer_t * );
 static FLAC__StreamEncoderWriteStatus
 EncoderWriteCallback( const FLAC__StreamEncoder *encoder,
                       const FLAC__byte buffer[],
-                      unsigned bytes, unsigned samples,
+                      size_t bytes, unsigned samples,
                       unsigned current_frame, void *client_data );
 
 static void EncoderMetadataCallback( const FLAC__StreamEncoder *encoder,
@@ -785,7 +785,7 @@ static void EncoderMetadataCallback( const FLAC__StreamEncoder *encoder,
 static FLAC__StreamEncoderWriteStatus
 EncoderWriteCallback( const FLAC__StreamEncoder *encoder,
                       const FLAC__byte buffer[],
-                      unsigned bytes, unsigned samples,
+                      size_t bytes, unsigned samples,
                       unsigned current_frame, void *client_data )
 {
     VLC_UNUSED(encoder); VLC_UNUSED(current_frame);
@@ -797,7 +797,7 @@ EncoderWriteCallback( const FLAC__StreamEncoder *encoder,
     {
         if( p_sys->i_headers == 1 )
         {
-            msg_Dbg( p_enc, "Writing STREAMINFO: %i", bytes );
+            msg_Dbg( p_enc, "Writing STREAMINFO: %zu", bytes );
 
             /* Backup the STREAMINFO metadata block */
             p_enc->fmt_out.i_extra = STREAMINFO_SIZE + 4;



More information about the vlc-commits mailing list