]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: fix warning
authorSage Weil <sage@inktank.com>
Thu, 16 Aug 2012 21:27:35 +0000 (14:27 -0700)
committerSage Weil <sage@inktank.com>
Thu, 16 Aug 2012 21:37:06 +0000 (14:37 -0700)
librbd/internal.cc: In function 'int librbd::ictx_refresh(librbd::ImageCtx*)':
librbd/internal.cc:1334:59: warning: enumeral and non-enumeral type in conditional expression [enabled by default]

Signed-off-by: Sage Weil <sage@inktank.com>
src/librbd/internal.cc

index e767c324f63d90d1bc8973b9bf60cfb5a3973e12..fb96ce8ad8d16bf198d729794029a9dcd69abb9d 100644 (file)
@@ -1331,7 +1331,7 @@ namespace librbd {
        for (size_t i = 0; i < new_snapc.snaps.size(); ++i) {
          uint64_t features = ictx->old_format ? 0 : snap_features[i];
          uint8_t protection_status = ictx->old_format ?
-           RBD_PROTECTION_STATUS_UNPROTECTED : snap_protection[i];
+           (uint8_t)RBD_PROTECTION_STATUS_UNPROTECTED : snap_protection[i];
          cls_client::parent_info parent;
          if (!ictx->old_format)
            parent = snap_parents[i];