[vlc-devel] commit: mmap: fix debug message formats ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Nov 8 16:52:17 CET 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Nov 8 17:43:54 2008 +0200| [f3c8f164bfff4e4074d3c6987802a6d64b10705e] | committer: Rémi Denis-Courmont
mmap: fix debug message formats
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f3c8f164bfff4e4074d3c6987802a6d64b10705e
---
modules/access/mmap.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/access/mmap.c b/modules/access/mmap.c
index cbec770..ac91dc2 100644
--- a/modules/access/mmap.c
+++ b/modules/access/mmap.c
@@ -197,7 +197,7 @@ static block_t *Block (access_t *p_access)
#ifdef MMAP_DEBUG
int64_t dbgpos = lseek (p_sys->fd, 0, SEEK_CUR);
if (dbgpos != p_access->info.i_pos)
- msg_Err (p_access, "position: 0x%08llx instead of 0x%08llx",
+ msg_Err (p_access, "position: 0x%016"PRIx64" instead of 0x%016"PRIx64,
p_access->info.i_pos, dbgpos);
#endif
@@ -243,16 +243,16 @@ static block_t *Block (access_t *p_access)
block->i_buffer -= inner_offset;
#ifdef MMAP_DEBUG
- msg_Dbg (p_access, "mapped 0x%lx bytes at %p from offset 0x%lx",
- (unsigned long)length, addr, (unsigned long)outer_offset);
+ msg_Dbg (p_access, "mapped 0x%zx bytes at %p from offset 0x%"PRIx64,
+ length, addr, (uint64_t)outer_offset);
/* Compare normal I/O with memory mapping */
char *buf = malloc (block->i_buffer);
ssize_t i_read = read (p_sys->fd, buf, block->i_buffer);
if (i_read != (ssize_t)block->i_buffer)
- msg_Err (p_access, "read %u instead of %u bytes", (unsigned)i_read,
- (unsigned)block->i_buffer);
+ msg_Err (p_access, "read %zd instead of %zu bytes", i_read,
+ block->i_buffer);
if (memcmp (buf, block->p_buffer, block->i_buffer))
msg_Err (p_access, "inconsistent data buffer");
free (buf);
More information about the vlc-devel
mailing list