From ca7fa0c854b4e6687276ce0b62d39405b4e25ade Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Mon, 22 Aug 2016 02:53:00 +1000 Subject: [PATCH] lib/util: Fix format strings and argument data types BUG: https://bugzilla.samba.org/show_bug.cgi?id=12168 Signed-off-by: Amitay Isaacs Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Aug 24 05:32:15 CEST 2016 on sn-devel-144 (cherry picked from commit 04126d54d5430c5e2fdbbfea58d76b253b81a407) --- lib/util/talloc_report.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/util/talloc_report.c b/lib/util/talloc_report.c index 5d96ddd27ad..63213a014b6 100644 --- a/lib/util/talloc_report.c +++ b/lib/util/talloc_report.c @@ -146,18 +146,18 @@ static void talloc_report_str_helper(const void *ptr, int depth, int max_depth, state->s = talloc_asprintf_append_largebuf( state->s, &state->str_len, "%*s%-30s contains %6lu bytes in %3lu blocks " - "(ref %d): %*s\n", depth*4, "", name, + "(ref %zu): %*s\n", depth*4, "", name, (unsigned long)talloc_total_size(ptr), (unsigned long)talloc_total_blocks(ptr), talloc_reference_count(ptr), - MIN(50, talloc_get_size(ptr)), + (int)MIN(50, talloc_get_size(ptr)), (const char *)ptr); return; } state->s = talloc_asprintf_append_largebuf( state->s, &state->str_len, - "%*s%-30s contains %6lu bytes in %3lu blocks (ref %d) %p\n", + "%*s%-30s contains %6lu bytes in %3lu blocks (ref %zu) %p\n", depth*4, "", name, (unsigned long)talloc_total_size(ptr), (unsigned long)talloc_total_blocks(ptr),