[vlc-devel] commit: Format string fixes ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu Jul 3 19:44:53 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Thu Jul 3 20:39:21 2008 +0300| [3ccefd743ac2497a40acf007ba1a4d041b81d2a8]
Format string fixes
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3ccefd743ac2497a40acf007ba1a4d041b81d2a8
---
modules/access/v4l2/v4l2.c | 2 +-
modules/access_filter/bandwidth.c | 2 +-
modules/codec/adpcm.c | 2 +-
modules/codec/avcodec/audio.c | 2 +-
modules/codec/cinepak.c | 2 +-
modules/codec/cvdsub.c | 14 ++++++++------
modules/codec/rawvideo.c | 2 +-
modules/codec/spudec/spudec.c | 2 +-
modules/codec/svcdsub.c | 10 +++++-----
modules/demux/real.c | 2 +-
10 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/modules/access/v4l2/v4l2.c b/modules/access/v4l2/v4l2.c
index 1bc4f35..aa67b36 100644
--- a/modules/access/v4l2/v4l2.c
+++ b/modules/access/v4l2/v4l2.c
@@ -1629,7 +1629,7 @@ static block_t* GrabAudio( demux_t *p_demux )
/* Test for overrun */
if( i_correction_delta > p_sys->i_audio_max_frame_size )
{
- msg_Warn( p_demux, "ALSA read overrun (%d > %d)",
+ msg_Warn( p_demux, "ALSA read overrun (%zu > %zu)",
i_correction_delta, p_sys->i_audio_max_frame_size );
i_correction_delta = p_sys->i_audio_max_frame_size;
snd_pcm_prepare( p_sys->p_alsa_pcm );
diff --git a/modules/access_filter/bandwidth.c b/modules/access_filter/bandwidth.c
index ff00f9c..bc1d711 100644
--- a/modules/access_filter/bandwidth.c
+++ b/modules/access_filter/bandwidth.c
@@ -144,7 +144,7 @@ retry:
if (len > delta)
{
- msg_Dbg (access, "reading %u bytes instead of %u", (unsigned)delta,
+ msg_Dbg (access, "reading %"PRIu64" bytes instead of %zu", delta,
len);
len = (int)delta;
}
diff --git a/modules/codec/adpcm.c b/modules/codec/adpcm.c
index 9c28016..41ce99e 100644
--- a/modules/codec/adpcm.c
+++ b/modules/codec/adpcm.c
@@ -202,7 +202,7 @@ static int OpenDecoder( vlc_object_t *p_this )
{
p_sys->i_block = (p_sys->codec == ADPCM_IMA_QT) ?
34 * p_dec->fmt_in.audio.i_channels : 1024;
- msg_Warn( p_dec, "block size undefined, using %d", p_sys->i_block );
+ msg_Warn( p_dec, "block size undefined, using %zu", p_sys->i_block );
}
else
{
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index 2a65ad3..0079304 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -293,7 +293,7 @@ aout_buffer_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
if( i_used < 0 || i_output < 0 )
{
if( i_used < 0 )
- msg_Warn( p_dec, "cannot decode one frame (%d bytes)",
+ msg_Warn( p_dec, "cannot decode one frame (%zu bytes)",
p_block->i_buffer );
block_Release( p_block );
diff --git a/modules/codec/cinepak.c b/modules/codec/cinepak.c
index fadcc2a..3a41336 100644
--- a/modules/codec/cinepak.c
+++ b/modules/codec/cinepak.c
@@ -154,7 +154,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
p_block->p_buffer );
if( i_status < 0 )
{
- msg_Warn( p_dec, "cannot decode one frame (%d bytes)",
+ msg_Warn( p_dec, "cannot decode one frame (%zu bytes)",
p_block->i_buffer );
block_Release( p_block );
return NULL;
diff --git a/modules/codec/cvdsub.c b/modules/codec/cvdsub.c
index 119a327..48da421 100644
--- a/modules/codec/cvdsub.c
+++ b/modules/codec/cvdsub.c
@@ -220,7 +220,7 @@ static block_t *Reassemble( decoder_t *p_dec, block_t *p_block )
if( p_block->i_buffer < SPU_HEADER_LEN )
{
- msg_Dbg( p_dec, "invalid packet header (size %d < %d)" ,
+ msg_Dbg( p_dec, "invalid packet header (size %zu < %u)" ,
p_block->i_buffer, SPU_HEADER_LEN );
block_Release( p_block );
return NULL;
@@ -253,11 +253,11 @@ static block_t *Reassemble( decoder_t *p_dec, block_t *p_block )
if( p_spu->i_buffer != p_sys->i_spu_size )
{
- msg_Warn( p_dec, "SPU packets size=%d should be %d",
+ msg_Warn( p_dec, "SPU packets size=%zu should be %zu",
p_spu->i_buffer, p_sys->i_spu_size );
}
- msg_Dbg( p_dec, "subtitle packet complete, size=%d", p_spu->i_buffer);
+ msg_Dbg( p_dec, "subtitle packet complete, size=%zuu", p_spu->i_buffer);
ParseMetaInfo( p_dec, p_spu );
@@ -315,7 +315,7 @@ static void ParseHeader( decoder_t *p_dec, block_t *p_block )
p_sys->i_image_length = p_sys->metadata_offset - p_sys->i_image_offset;
#ifdef DEBUG_CVDSUB
- msg_Dbg( p_dec, "total size: %d image size: %d",
+ msg_Dbg( p_dec, "total size: %zu image size: %zu",
p_sys->i_spu_size, p_sys->i_image_length );
#endif
}
@@ -461,7 +461,8 @@ static void ParseMetaInfo( decoder_t *p_dec, block_t *p_spu )
p_sys->first_field_offset =
(p[2] << 8) + p[3] - p_sys->i_image_offset;
#ifdef DEBUG_CVDSUB
- msg_Dbg( p_dec, "1st_field_offset %d", p_sys->first_field_offset );
+ msg_Dbg( p_dec, "1st_field_offset %zu",
+ p_sys->first_field_offset );
#endif
break;
@@ -471,7 +472,8 @@ static void ParseMetaInfo( decoder_t *p_dec, block_t *p_spu )
p_sys->second_field_offset =
(p[2] << 8) + p[3] - p_sys->i_image_offset;
#ifdef DEBUG_CVDSUB
- msg_Dbg( p_dec, "2nd_field_offset %d", p_sys->second_field_offset);
+ msg_Dbg( p_dec, "2nd_field_offset %zu",
+ p_sys->second_field_offset);
#endif
break;
diff --git a/modules/codec/rawvideo.c b/modules/codec/rawvideo.c
index ccca3fa..c149864 100644
--- a/modules/codec/rawvideo.c
+++ b/modules/codec/rawvideo.c
@@ -229,7 +229,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if( p_block->i_buffer < p_sys->i_raw_size )
{
- msg_Warn( p_dec, "invalid frame size (%d < %d)",
+ msg_Warn( p_dec, "invalid frame size (%zu < %zu)",
p_block->i_buffer, p_sys->i_raw_size );
block_Release( p_block );
diff --git a/modules/codec/spudec/spudec.c b/modules/codec/spudec/spudec.c
index 7385391..5f4e83e 100644
--- a/modules/codec/spudec/spudec.c
+++ b/modules/codec/spudec/spudec.c
@@ -206,7 +206,7 @@ static block_t *Reassemble( decoder_t *p_dec, block_t **pp_block )
( p_block->i_pts <= 0 || p_block->i_buffer < 4 ) )
{
msg_Dbg( p_dec, "invalid starting packet (size < 4 or pts <=0)" );
- msg_Dbg( p_dec, "spu size: %d, i_pts: %"PRId64" i_buffer: %d",
+ msg_Dbg( p_dec, "spu size: %d, i_pts: %"PRId64" i_buffer: %zu",
p_sys->i_spu_size, p_block->i_pts, p_block->i_buffer );
block_Release( p_block );
return NULL;
diff --git a/modules/codec/svcdsub.c b/modules/codec/svcdsub.c
index 6e39aa4..b7bf4a9 100644
--- a/modules/codec/svcdsub.c
+++ b/modules/codec/svcdsub.c
@@ -261,7 +261,7 @@ static block_t *Reassemble( decoder_t *p_dec, block_t *p_block )
if( p_block->i_buffer < SPU_HEADER_LEN )
{
- msg_Dbg( p_dec, "invalid packet header (size %d < %d)" ,
+ msg_Dbg( p_dec, "invalid packet header (size %zu < %u)" ,
p_block->i_buffer, SPU_HEADER_LEN );
block_Release( p_block );
return NULL;
@@ -350,12 +350,12 @@ static block_t *Reassemble( decoder_t *p_dec, block_t *p_block )
if( p_spu->i_buffer != p_sys->i_spu_size )
{
- msg_Warn( p_dec, "subtitle packets size=%d should be %d",
+ msg_Warn( p_dec, "subtitle packets size=%zu should be %zu",
p_spu->i_buffer, p_sys->i_spu_size );
}
dbg_print( (DECODE_DBG_PACKET),
- "subtitle packet complete, size=%d", p_spu->i_buffer );
+ "subtitle packet complete, size=%zu", p_spu->i_buffer );
p_sys->i_state = SUBTITLE_BLOCK_EMPTY;
p_sys->p_spu = 0;
@@ -437,10 +437,10 @@ static void ParseHeader( decoder_t *p_dec, block_t *p_block )
if (p_sys && p_sys->i_debug & DECODE_DBG_PACKET)
{
msg_Dbg( p_dec, "x-start: %d, y-start: %d, width: %d, height %d, "
- "spu size: %d, duration: %lu (d:%d p:%d)",
+ "spu size: %zu, duration: %"PRIu64" (d:%zu p:%"PRIu16")",
p_sys->i_x_start, p_sys->i_y_start,
p_sys->i_width, p_sys->i_height,
- p_sys->i_spu_size, (long unsigned int) p_sys->i_duration,
+ p_sys->i_spu_size, p_sys->i_duration,
p_sys->i_image_length, p_sys->i_image_offset);
for( i = 0; i < 4; i++ )
diff --git a/modules/demux/real.c b/modules/demux/real.c
index 4ed3e03..5d5d40d 100644
--- a/modules/demux/real.c
+++ b/modules/demux/real.c
@@ -401,7 +401,7 @@ static int Demux( demux_t *p_demux )
( tk->p_frame->i_dts != i_pts ||
tk->i_frame != i_len ) )
{
- msg_Dbg( p_demux, "sending size=%d", tk->p_frame->i_buffer );
+ msg_Dbg( p_demux, "sending size=%zu", tk->p_frame->i_buffer );
es_out_Send( p_demux->out, tk->p_es, tk->p_frame );
More information about the vlc-devel
mailing list