From b49daff8823524d7fe341e83fbb4177e5e4a47e9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 1 Feb 2012 01:16:03 +0000 Subject: Reduce use of non-portable %zu format. git-svn-id: http://svn.drobilla.net/zix/trunk@56 df6676b4-ccc9-40e5-b5d6-7c4628a128e3 --- src/tree_debug.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/tree_debug.h b/src/tree_debug.h index 74f4e0e..e903265 100644 --- a/src/tree_debug.h +++ b/src/tree_debug.h @@ -90,7 +90,8 @@ verify_balance(ZixTreeNode* n) const intptr_t left_height = (intptr_t)height(n->left); const intptr_t right_height = (intptr_t)height(n->right); if (n->balance != right_height - left_height) { - fprintf(stderr, "Bad balance at %ld: h_r (%zu) - l_h (%zu) != %d\n", + fprintf(stderr, "Bad balance at %ld: h_r (%" PRIdPTR ")" + "- l_h (%" PRIdPTR ") != %d\n", (intptr_t)n->data, right_height, left_height, n->balance); assert(false); return false; @@ -118,7 +119,7 @@ verify(ZixTree* t, ZixTreeNode* n) if (n->left) { if (t->cmp(n->left->data, n->data, t->cmp_data) > 0) { - fprintf(stderr, "Bad order: %zu with left child\n", + fprintf(stderr, "Bad order: %" PRIdPTR " with left child\n", (intptr_t)n->data); fprintf(stderr, "%p ? %p\n", (void*)n, (void*)n->left); fprintf(stderr, "%" PRIdPTR " ? %" PRIdPTR "\n", (intptr_t)n->data, @@ -132,7 +133,7 @@ verify(ZixTree* t, ZixTreeNode* n) if (n->right) { if (t->cmp(n->right->data, n->data, t->cmp_data) < 0) { - fprintf(stderr, "Bad order: %zu with right child\n", + fprintf(stderr, "Bad order: %" PRIdPTR " with right child\n", (intptr_t)n->data); return false; } -- cgit v1.2.1