]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: silence the unused variable warning 11678/head
authorKefu Chai <kchai@redhat.com>
Fri, 28 Oct 2016 12:28:26 +0000 (20:28 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 28 Oct 2016 12:40:02 +0000 (20:40 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/librbd/image/test_mock_RefreshRequest.cc

index 008fd217caeb2d8b23af433ba1400559cf1582c9..33566c3745d97b687e8c2936d08aaed9d744e31a 100644 (file)
@@ -192,6 +192,11 @@ public:
   void expect_snap_namespace_list(MockRefreshImageCtx &mock_image_ctx, int r) {
     auto &expect = EXPECT_CALL(get_mock_io_ctx(mock_image_ctx.md_ctx),
                                exec(mock_image_ctx.header_oid, _, StrEq("rbd"), StrEq("get_snapshot_namespace"), _, _, _));
+    if (r < 0) {
+      expect.WillOnce(Return(r));
+    } else {
+      expect.WillOnce(DoDefault());
+    }
   }
 
   void expect_add_snap(MockRefreshImageCtx &mock_image_ctx,