]> sourceware.org Git - lvm2.git/commitdiff
libdm: cast walk flags to uint64_t when logging.
authorBryn M. Reeves <bmr@redhat.com>
Tue, 5 Jul 2016 19:45:24 +0000 (20:45 +0100)
committerBryn M. Reeves <bmr@redhat.com>
Tue, 5 Jul 2016 19:45:24 +0000 (20:45 +0100)
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

index 83c4d5043f7d0b3e5b44df08fd923d179ee6a1ad..07503a5dc98bcfc6b1cb285d26f6020d255b657b 100644 (file)
@@ -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;
This page took 0.041482 seconds and 5 git commands to generate.