From 4d4f48af9f18b9407c065cdc035cf8e397e08ac0 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Tue, 5 Jul 2016 20:45:24 +0100 Subject: [PATCH] libdm: cast walk flags to uint64_t when logging. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Walk flags are ULL constants; cast the result to a uint64_t before logging with a FMTx64 format specifier to avoid a compiler warning: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘long long unsigned int’ --- libdm/libdm-stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index 83c4d5043..07503a5dc 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -1399,7 +1399,7 @@ int dm_stats_walk_init(struct dm_stats *dms, uint64_t flags) if (flags & ~DM_STATS_WALK_MASK) { log_error("Unknown value in walk flags: 0x" FMTx64, - flags & ~DM_STATS_WALK_MASK); + (uint64_t) (flags & ~DM_STATS_WALK_MASK)); return 0; } dms->walk_flags = flags;