From 0c5e50f430e40de569d075a81c97b2aab7c5c2c8 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 9 Mar 2014 19:11:54 +0100 Subject: [PATCH] Fix format string type mismatch in src/capability.c. The type 'long' was correct on most machines but not according to the C standard and Windows 64-bit. --- src/capability.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/capability.c b/src/capability.c index e924e7a7..daf72657 100644 --- a/src/capability.c +++ b/src/capability.c @@ -247,8 +247,8 @@ capability_index_stats(void (*cb)(const char *line, void *privdata), void *privd cb(buf, privdata); } - rb_snprintf(buf, sizeof buf, "'%s': remaining bits - %ld", idx->name, - (sizeof(unsigned int) * 8) - (idx->highest_bit - 1)); + rb_snprintf(buf, sizeof buf, "'%s': remaining bits - %u", idx->name, + (unsigned int)((sizeof(unsigned int) * 8) - (idx->highest_bit - 1))); cb(buf, privdata); }