[vlc-devel] commit: Format string fixes ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu Jul 3 20:17:15 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Thu Jul 3 21:19:21 2008 +0300| [d794dd855b59cba17d4b3c39f5c864ba22c8a1c1]
Format string fixes
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d794dd855b59cba17d4b3c39f5c864ba22c8a1c1
---
modules/access_filter/bandwidth.c | 2 +-
modules/codec/adpcm.c | 2 +-
modules/misc/audioscrobbler.c | 7 ++++---
modules/misc/dummy/decoder.c | 2 +-
modules/misc/stats/decoder.c | 6 ++++--
modules/misc/stats/encoder.c | 4 ++--
modules/misc/stats/vout.c | 3 ++-
modules/mux/asf.c | 2 +-
modules/mux/mpjpeg.c | 2 +-
.../dynamicoverlay/dynamicoverlay_commands.c | 4 ++--
10 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/modules/access_filter/bandwidth.c b/modules/access_filter/bandwidth.c
index bc1d711..cb78677 100644
--- a/modules/access_filter/bandwidth.c
+++ b/modules/access_filter/bandwidth.c
@@ -154,7 +154,7 @@ retry:
len = src->pf_read (src, buffer, len);
access->info = src->info;
- msg_Dbg (access, "read %u bytes", len);
+ msg_Dbg (access, "read %zu bytes", len);
return len;
}
diff --git a/modules/codec/adpcm.c b/modules/codec/adpcm.c
index 41ce99e..c9a9ec2 100644
--- a/modules/codec/adpcm.c
+++ b/modules/codec/adpcm.c
@@ -241,7 +241,7 @@ static int OpenDecoder( vlc_object_t *p_this )
}
msg_Dbg( p_dec, "format: samplerate:%d Hz channels:%d bits/sample:%d "
- "blockalign:%d samplesperblock:%d",
+ "blockalign:%zu samplesperblock:%zu",
p_dec->fmt_in.audio.i_rate, p_dec->fmt_in.audio.i_channels,
p_dec->fmt_in.audio.i_bitspersample, p_sys->i_block,
p_sys->i_samplesperblock );
diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c
index fbdd499..da02d64 100644
--- a/modules/misc/audioscrobbler.c
+++ b/modules/misc/audioscrobbler.c
@@ -353,7 +353,7 @@ static void Run( intf_thread_t *p_intf )
p_song = &p_sys->p_queue[i_song];
if( !asprintf( &psz_submit_song,
"&a%%5B%d%%5D=%s&t%%5B%d%%5D=%s"
- "&i%%5B%d%%5D=%llu&o%%5B%d%%5D=P&r%%5B%d%%5D="
+ "&i%%5B%d%%5D=%ju&o%%5B%d%%5D=P&r%%5B%d%%5D="
"&l%%5B%d%%5D=%d&b%%5B%d%%5D=%s"
"&n%%5B%d%%5D=%s&m%%5B%d%%5D=%s",
i_song, p_song->psz_a, i_song, p_song->psz_t,
@@ -695,7 +695,7 @@ static int Handshake( intf_thread_t *p_this )
{
char *psz_username, *psz_password;
time_t timestamp;
- char psz_timestamp[33];
+ char psz_timestamp[21];
struct md5_s p_struct_md5;
@@ -745,7 +745,8 @@ static int Handshake( intf_thread_t *p_this )
return VLC_ENOMEM;
}
- snprintf( psz_timestamp, 33, "%llu", (uintmax_t)timestamp );
+ snprintf( psz_timestamp, sizeof( psz_timestamp ), "%"PRIu64,
+ (uint64_t)timestamp );
/* generates a md5 hash of :
* - md5 hash of the password, plus
diff --git a/modules/misc/dummy/decoder.c b/modules/misc/dummy/decoder.c
index 1c632d2..d02ae31 100644
--- a/modules/misc/dummy/decoder.c
+++ b/modules/misc/dummy/decoder.c
@@ -135,7 +135,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
write( p_sys->i_fd, p_block->p_buffer, p_block->i_buffer );
#endif
- msg_Dbg( p_dec, "dumped %i bytes", p_block->i_buffer );
+ msg_Dbg( p_dec, "dumped %zu bytes", p_block->i_buffer );
}
block_Release( p_block );
diff --git a/modules/misc/stats/decoder.c b/modules/misc/stats/decoder.c
index 54dd63d..2f899ba 100644
--- a/modules/misc/stats/decoder.c
+++ b/modules/misc/stats/decoder.c
@@ -76,8 +76,10 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
if( p_block->i_buffer == kBufferSize )
{
- msg_Dbg( p_dec, "got %d ms", *(mtime_t *)p_block->p_buffer / 1000 );
- msg_Dbg( p_dec, "got %d ms offset", (mdate() - *(mtime_t *)p_block->p_buffer) / 1000 );
+ msg_Dbg( p_dec, "got %"PRIu64" ms",
+ *(mtime_t *)p_block->p_buffer / 1000 );
+ msg_Dbg( p_dec, "got %"PRIu64" ms offset",
+ (mdate() - *(mtime_t *)p_block->p_buffer) / 1000 );
*(mtime_t *)(p_pic->p->p_pixels) = *(mtime_t *)p_block->p_buffer;
}
else
diff --git a/modules/misc/stats/encoder.c b/modules/misc/stats/encoder.c
index 7edfe19..2cf9c6d 100644
--- a/modules/misc/stats/encoder.c
+++ b/modules/misc/stats/encoder.c
@@ -83,8 +83,8 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
p_block->i_length = kBufferSize;
p_block->i_dts = p_pict->date;
- msg_Dbg( p_enc, "putting %dms", *(mtime_t*)p_block->p_buffer / 1000 );
-
+ msg_Dbg( p_enc, "putting %"PRIu64"ms",
+ *(mtime_t*)p_block->p_buffer / 1000 );
return p_block;
}
diff --git a/modules/misc/stats/vout.c b/modules/misc/stats/vout.c
index 0c1514a..5fb4bd8 100644
--- a/modules/misc/stats/vout.c
+++ b/modules/misc/stats/vout.c
@@ -214,7 +214,8 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
*****************************************************************************/
static void Display( vout_thread_t *p_vout, picture_t *p_pic )
{
- msg_Dbg( p_vout, "VOUT got %d ms offset", (mdate() - *(mtime_t *)p_pic->p->p_pixels) / 1000 );
+ msg_Dbg( p_vout, "VOUT got %"PRIu64" ms offset",
+ (mdate() - *(mtime_t *)p_pic->p->p_pixels) / 1000 );
/* No need to do anything, the fake direct buffers stay as they are */
}
diff --git a/modules/mux/asf.c b/modules/mux/asf.c
index 52a4553..e6a21a7 100644
--- a/modules/mux/asf.c
+++ b/modules/mux/asf.c
@@ -222,7 +222,7 @@ static int Open( vlc_object_t *p_this )
p_sys->i_bitrate_override = config_GetInt( p_mux, "sout-asf-bitrate-override" );
msg_Dbg( p_mux, "Packet size %d", p_sys->i_packet_size);
if (p_sys->i_bitrate_override)
- msg_Dbg( p_mux, "Bitrate override %d", p_sys->i_bitrate_override);
+ msg_Dbg( p_mux, "Bitrate override %"PRId64, p_sys->i_bitrate_override);
p_sys->i_packet_count= 0;
/* Generate a random fid */
diff --git a/modules/mux/mpjpeg.c b/modules/mux/mpjpeg.c
index 98b2fad..0d53522 100644
--- a/modules/mux/mpjpeg.c
+++ b/modules/mux/mpjpeg.c
@@ -165,7 +165,7 @@ static int Mux( sout_mux_t *p_mux )
static const char psz_hfmt[] = "\r\n"
"--"BOUNDARY"\r\n"
"Content-Type: image/jpeg\r\n"
- "Content-Length: %u\r\n"
+ "Content-Length: %zu\r\n"
"\r\n";
block_t *p_data = block_FifoGet( p_fifo );
block_t *p_header = block_New( p_mux, sizeof( psz_hfmt ) + 20 );
diff --git a/modules/video_filter/dynamicoverlay/dynamicoverlay_commands.c b/modules/video_filter/dynamicoverlay/dynamicoverlay_commands.c
index bb0b381..78a735d 100644
--- a/modules/video_filter/dynamicoverlay/dynamicoverlay_commands.c
+++ b/modules/video_filter/dynamicoverlay/dynamicoverlay_commands.c
@@ -510,7 +510,7 @@ static int exec_DataSharedMem( filter_t *p_filter,
if( i_neededsize > i_size )
{
msg_Err( p_filter,
- "Insufficient data in shared memory. need %d, got %d",
+ "Insufficient data in shared memory. need %zu, got %zu",
i_neededsize, i_size );
p_ovl->data.p_pic->pf_release( p_ovl->data.p_pic );
free( p_ovl->data.p_pic );
@@ -917,7 +917,7 @@ void RegisterCommand( filter_t *p_filter )
p_sys->pp_commands[i_index]->pf_unparse = p_commands[i_index].pf_unparse;
}
- msg_Dbg( p_filter, "%d commands are available", p_sys->i_commands );
+ msg_Dbg( p_filter, "%zu commands are available", p_sys->i_commands );
for( size_t i_index = 0; i_index < p_sys->i_commands; i_index++ )
msg_Dbg( p_filter, " %s", p_sys->pp_commands[i_index]->psz_command );
}
More information about the vlc-devel
mailing list