[vlc-devel] [PATCH 1/1] Fix mingw failing to handle %zu

davidf+nntp at woaf.net davidf+nntp at woaf.net
Thu Nov 13 22:34:43 CET 2008


From: David Flynn <davidf at rd.bbc.co.uk>

This reverts commit 8945211 and also corrects the format string 'problem'.

The version of mingw currently [1] in use uses a non mscrt vsnprintf()
that does not understand the length modifer z; Arguments such as:
  ...printf("%zu %s", 4, "x");
will result in treating the second argument as a string.

[1] mingw32: 4.2.1.dfsg-1 runtime: 3.13-1

Signed-off-by: David Flynn <davidf at rd.bbc.co.uk>
---
 src/modules/modules.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/modules.c b/src/modules/modules.c
index 75656b9..17fe9c0 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -544,8 +544,8 @@ found_shortcut:
 
     /* Sort candidates by descending score */
     qsort (p_list, count, sizeof (p_list[0]), modulecmp);
-    msg_Dbg( p_this, "looking for %s module: %zu candidate%s", psz_capability,
-             count, count == 1 ? "" : "s" );
+    msg_Dbg( p_this, "looking for %s module: %u candidate%s", psz_capability,
+             (unsigned) count, count == 1 ? "" : "s" );
 
     /* Parse the linked list and use the first successful module */
     p_module = NULL;
-- 
1.5.6.5




More information about the vlc-devel mailing list