[vlc-devel] commit: mmap: fix debug message formats ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Nov 8 16:53:08 CET 2008


vlc | branch: 0.9-bugfix | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Nov  8 17:43:54 2008 +0200| [219b054e44ba278bb3eacb8fdcc642d90ac79011] | committer: Rémi Denis-Courmont 

mmap: fix debug message formats
(cherry picked from commit f3c8f164bfff4e4074d3c6987802a6d64b10705e)

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

 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 4c41bb6..7e3a4a7 100644
--- a/modules/access/mmap.c
+++ b/modules/access/mmap.c
@@ -193,7 +193,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
 
@@ -236,16 +236,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