]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
unittest_bit_alloc: silence clang analyzer warning
authorKefu Chai <kchai@redhat.com>
Mon, 28 Aug 2017 09:03:09 +0000 (17:03 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 28 Aug 2017 09:03:34 +0000 (17:03 +0800)
silences following warning:

Value stored to 'allocated' is never read

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/objectstore/BitAllocator_test.cc

index 5d1da96a016addee55895c7900c466d303556ac0..2ed8d81a442b84b4bd30e85c8c8ef322c11ac162 100644 (file)
@@ -245,7 +245,6 @@ TEST(BitAllocator, test_bmap_entry)
     bmap = new BmapEntry(g_ceph_context, false);
     start = -1;
     scanned = 0;
-    allocated = 0;
     allocated = bmap->find_first_set_bits(1, 1, &start, &scanned);
     bmap_test_assert(allocated == 1);
     bmap_test_assert(start == 1);